From dea6e5e76355d9086d65227f87deee823df0ae77 Mon Sep 17 00:00:00 2001 From: Adrian Wong Date: Wed, 20 Jun 2018 21:28:56 +1000 Subject: [PATCH 1/2] fix: Recover from all errors on calling `proc "cabal" --numeric-version` --- src/Stack/Setup.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Stack/Setup.hs b/src/Stack/Setup.hs index 7ab0890121..5ac40f61b7 100644 --- a/src/Stack/Setup.hs +++ b/src/Stack/Setup.hs @@ -1353,7 +1353,7 @@ buildInGhcjsEnv envConfig boptsCli = do getCabalInstallVersion :: (HasProcessContext env, HasLogFunc env) => RIO env (Maybe Version) getCabalInstallVersion = do - ebs <- proc "cabal" ["--numeric-version"] $ tryAny . readProcessStdout_ + ebs <- tryAny $ proc "cabal" ["--numeric-version"] readProcessStdout_ case ebs of Left _ -> return Nothing Right bs -> Just <$> parseVersion (T.dropWhileEnd isSpace (T.decodeUtf8 (LBS.toStrict bs))) From f8f8e5d713a493b15769f72b130b27c7ec24510f Mon Sep 17 00:00:00 2001 From: Adrian Wong Date: Wed, 20 Jun 2018 21:58:54 +1000 Subject: [PATCH 2/2] docs: Add bugfix description to changelog --- ChangeLog.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ChangeLog.md b/ChangeLog.md index 09bf960ddf..e8dcd5690d 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -55,6 +55,8 @@ Bug fixes: * When prompting users about saving their Hackage credentials on upload, flush to stdout before waiting for the response so the prompt actually displays. Also fixes a similar issue with ghci target selection prompt. +* If `cabal` is not on PATH, running `stack solver` now prompts the user + to run `stack install cabal-install` ## v1.7.1