Skip to content

Commit

Permalink
Improved findLibDir to search in build/ihp-lib. Fixes #331
Browse files Browse the repository at this point in the history
  • Loading branch information
mpscholten committed Aug 16, 2020
1 parent 37e5aab commit 00be915
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions IHP/FrameworkConfig.hs
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,12 @@ appDatabaseUrl = do
findLibDirectory :: IO Text
findLibDirectory = do
frameworkMountedLocally <- Directory.doesDirectoryExist "IHP"
ihpLibSymlinkAvailable <- Directory.doesDirectoryExist "build/ihp-lib"
if frameworkMountedLocally
then pure "IHP/lib/IHP/"
else do
binDir <- cs <$> Process.readCreateProcess (Process.shell "dirname $(which RunDevServer)") ""
pure (Text.strip binDir <> "/../lib/IHP/")
else if ihpLibSymlinkAvailable
then do
pure "build/ihp-lib/"
else do
binDir <- cs <$> Process.readCreateProcess (Process.shell "dirname $(which RunDevServer)") ""
pure (Text.strip binDir <> "/../lib/IHP/")

0 comments on commit 00be915

Please sign in to comment.