error handling when checking for stack binary

This commit is contained in:
Josh Berman 2016-04-20 16:43:06 +03:00
parent d44f8539ab
commit 1038fc0125
2 changed files with 3 additions and 3 deletions

View File

@ -79,8 +79,8 @@ keter cabal noBuild noCopyTo buildArgs = do
unless noBuild $ do
stackQueryRunSuccess <- do
(ec,_,_) <- readProcessWithExitCode "stack" ["query"] ""
return (ec == ExitSuccess)
eres <- try $ readProcessWithExitCode "stack" ["query"] "" :: IO (Either SomeException (ExitCode, String, String))
return $ either (\_ -> False) (\(ec, _, _) -> (ec == ExitSuccess)) eres
let inStackExec = isJust $ lookup "STACK_EXE" env'
mStackYaml = lookup "STACK_YAML" env'

View File

@ -1,5 +1,5 @@
name: yesod-bin
version: 1.4.18
version: 1.4.19
license: MIT
license-file: LICENSE
author: Michael Snoyman <michael@snoyman.com>