Skip to content

Commit

Permalink
Throw error if the exe to symlink is not found
Browse files Browse the repository at this point in the history
  • Loading branch information
jneira committed Feb 8, 2020
1 parent 50bcd8e commit a54febb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/CabalHelper/Compiletime/CompPrograms.hs
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ createProgSymlink bindir target
mb_exe_path <- findExecutable exe
case mb_exe_path of
Just exe_path -> createSymbolicLink exe_path (bindir </> takeFileName target)
Nothing -> createSymLinkFromCwd
| otherwise = createSymLinkFromCwd
where createSymLinkFromCwd = do
cwd <- getCurrentDirectory
createSymbolicLink (cwd </> target) (bindir </> takeFileName target)
Nothing -> error $ "Error trying to create symlink to " ++ target ++ ": "
++ exe ++ " executable not found."
| otherwise = do
cwd <- getCurrentDirectory
createSymbolicLink (cwd </> target) (bindir </> takeFileName target)

0 comments on commit a54febb

Please sign in to comment.