Catch all IOException's in the $PATH hack

This commit is contained in:
jneira 2019-11-11 08:45:43 +01:00
parent 98acf41752
commit 3224d7005f

View File

@ -105,8 +105,8 @@ stackBuildFailMsg =
withoutStackCachedBinaries :: Action a -> Action a
withoutStackCachedBinaries action = do
let getEnvErrorHandler e | isDoesNotExistError e = return Nothing
| otherwise = throwIO e
let getEnvErrorHandler :: IOException -> IO (Maybe String)
getEnvErrorHandler _ = return Nothing
mbPath <- liftIO (lookupEnv "PATH" `catch` getEnvErrorHandler)