Copyright(c) digitally induced GmbH 2020
Safe HaskellNone

IHP.LibDir

Description

 
Synopsis

Documentation

findLibDirectory :: IO Text Source #

Finds the lib

The location depends on whether the framework is installed through nix or checked out from git inside the current project directory.

When it's installed with nix, the lib dir is located at lib/ihp while the dev server binary is located at bin/RunDevServer.

ensureSymlink :: IO () Source #

Creates the build/ihp-lib symlink if missing

This is called in dev mode to make sure that build/ihp-lib points to the right IHP version. Otherwise the CLI tools might not work as expected, e.g. make db might fail.

If the symlink is missing, it tries to fix this by starting a new nix-shell and pinpointing the framework lib dir in there