Commit 0a386628 authored by Duncan Coutts's avatar Duncan Coutts
Browse files

Alter version parse error message to make it clearer

parent 23cfda3a
......@@ -208,7 +208,7 @@ findProgramAndVersion verbosity name maybePath versionArg selectVersion = do
str <- rawSystemStdout verbosity (programPath prog) [versionArg]
case readVersion (selectVersion str) of
Just v -> return prog { programVersion = Just v }
_ -> die ("cannot determine version of " ++ name ++ " :\n " ++ str)
_ -> die ("cannot determine version of " ++ name ++ " :\n" ++ show str)
-- ------------------------------------------------------------
-- * cabal programs
......
......@@ -470,7 +470,7 @@ configCompilerVersion GHC compilerP verbosity = do
str <- rawSystemStdout verbosity (programPath compilerP) ["--numeric-version"]
case pCheck (readP_to_S parseVersion str) of
[v] -> return v
_ -> die ("cannot determine version of " ++ programName compilerP ++ ":\n "++ str)
_ -> die ("cannot determine version of " ++ programName compilerP ++ ":\n"++ show str)
configCompilerVersion comp compilerP verbosity | comp `elem` [JHC,NHC] = do
str <- rawSystemStdout verbosity (programPath compilerP) ["--version"]
case words str of
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment