Print exception trying to get $PATH

This commit is contained in:
jneira 2019-11-11 09:34:21 +01:00
parent 3224d7005f
commit b53621ccc3

View File

@ -106,7 +106,10 @@ withoutStackCachedBinaries :: Action a -> Action a
withoutStackCachedBinaries action = do
let getEnvErrorHandler :: IOException -> IO (Maybe String)
getEnvErrorHandler _ = return Nothing
getEnvErrorHandler e = do
printLine "Error trying to get $PATH environment variable:"
printLine (show e)
return Nothing
mbPath <- liftIO (lookupEnv "PATH" `catch` getEnvErrorHandler)