File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed
Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -104,16 +104,18 @@ cabalSolver menv cabalfps constraintType
104104 fmap toFilePath cabalfps
105105
106106 catch (liftM Just (readProcessStdout (Just tmpdir) menv " cabal" args))
107- (\ e@ (ReadProcessException _ _ _ err) -> do
108- let errMsg = decodeUtf8With lenientDecode err
109- if LT. isInfixOf " Could not resolve dependencies" errMsg
110- then do
111- $ logInfo " Attempt failed."
112- $ logInfo " \n >>>> Cabal errors begin"
113- $ logInfo $ LT. toStrict errMsg
114- <> " <<<< Cabal errors end\n "
115- return Nothing
116- else throwM e)
107+ (\ ex -> case ex of
108+ ReadProcessException _ _ _ err -> do
109+ let errMsg = decodeUtf8With lenientDecode err
110+ if LT. isInfixOf " Could not resolve dependencies" errMsg
111+ then do
112+ $ logInfo " Attempt failed."
113+ $ logInfo " \n >>>> Cabal errors begin"
114+ $ logInfo $ LT. toStrict errMsg
115+ <> " <<<< Cabal errors end\n "
116+ return Nothing
117+ else throwM ex
118+ _ -> throwM ex)
117119 >>= maybe (return Nothing ) parseCabalOutput
118120
119121 where
You can’t perform that action at this time.
0 commit comments