[commit: ghc] wip/nfs-locking: :+1: (b47bd51)
git at git.haskell.org
git at git.haskell.org
Thu Oct 26 23:59:27 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/nfs-locking
Link : http://ghc.haskell.org/trac/ghc/changeset/b47bd516326d7d9652a1ba6d37352e01766390f2/ghc
>---------------------------------------------------------------
commit b47bd516326d7d9652a1ba6d37352e01766390f2
Author: Moritz Angermann <moritz.angermann at gmail.com>
Date: Thu Jan 7 13:51:30 2016 +0800
:+1:
>---------------------------------------------------------------
b47bd516326d7d9652a1ba6d37352e01766390f2
src/Builder.hs | 6 ++++--
src/Oracles/WindowsRoot.hs | 1 -
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/Builder.hs b/src/Builder.hs
index 6e4dba5..0613452 100644
--- a/src/Builder.hs
+++ b/src/Builder.hs
@@ -95,8 +95,10 @@ builderPath builder = do
putError $ "\nCannot find path to '" ++ (builderKey builder)
++ "' in configuration files."
windows <- windowsHost
- let path' = if null path then "" else path -<.> exe in
- (if windows then fixAbsolutePathOnWindows else lookupInPath) path'
+ case (path, windows) of
+ ("", _) -> return path
+ (p, True) -> fixAbsolutePathOnWindows (p -<.> exe)
+ (p, False) -> lookupInPath (p -<.> exe)
getBuilderPath :: Builder -> ReaderT a Action FilePath
getBuilderPath = lift . builderPath
diff --git a/src/Oracles/WindowsRoot.hs b/src/Oracles/WindowsRoot.hs
index 6def89c..4186700 100644
--- a/src/Oracles/WindowsRoot.hs
+++ b/src/Oracles/WindowsRoot.hs
@@ -46,7 +46,6 @@ lookupInPath c
| otherwise = do
envPaths <- splitOn ":" <$> getEnvWithDefault "" "PATH"
let candidates = map (-/- c) envPaths
- liftIO $ mapM_ putStrLn candidates
-- this will crash if we do not find any valid candidate.
head <$> filterM doesFileExist candidates
More information about the ghc-commits
mailing list