Skip to content

Commit

Permalink
Dont resolve symlinks in cradle initilisation
Browse files Browse the repository at this point in the history
Prefer 'makeAbsolute' over 'canonicalizePath'
  • Loading branch information
fendor committed Jul 2, 2020
1 parent 3ef92a9 commit f8f32d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/HIE/Bios/Cradle.hs
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ multiCradle buildCustomCradle cur_dir cs =
{ cradleRootDir = cur_dir
, cradleOptsProg = CradleAction
{ actionName = multiActionName
, runCradle = \l fp -> canonicalizePath fp >>= multiAction buildCustomCradle cur_dir cs l
, runCradle = \l fp -> makeAbsolute fp >>= multiAction buildCustomCradle cur_dir cs l
, runGhcCmd = \args ->
-- We're being lazy here and just returning the ghc path for the
-- first non-none cradle. This shouldn't matter in practice: all
Expand Down Expand Up @@ -301,7 +301,7 @@ multiAction buildCustomCradle cur_dir cs l cur_fp =
canonicalizeCradles :: IO [(FilePath, CradleConfig b)]
canonicalizeCradles =
sortOn (Down . fst)
<$> mapM (\(p, c) -> (,c) <$> (canonicalizePath (cur_dir </> p))) cs
<$> mapM (\(p, c) -> (,c) <$> (makeAbsolute (cur_dir </> p))) cs

selectCradle [] =
return (CradleFail (CradleError [] ExitSuccess err_msg))
Expand Down

0 comments on commit f8f32d4

Please sign in to comment.