Skip to content

Commit

Permalink
Out of memory warning if Cabal exits with -9 (#947)
Browse files Browse the repository at this point in the history
  • Loading branch information
borsboom committed Sep 8, 2015
1 parent 76716b3 commit 884e956
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Stack/Types/Build.hs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ import Stack.Types.Package
import Stack.Types.PackageIdentifier
import Stack.Types.PackageName
import Stack.Types.Version
import System.Exit (ExitCode)
import System.Exit (ExitCode (ExitFailure))
import System.FilePath (dropTrailingPathSeparator, pathSeparator)

----------------------------------------------
Expand Down Expand Up @@ -235,6 +235,9 @@ instance Show StackBuildException where
in "\n-- While building package " ++ dropQuotes (show taskProvides') ++ " using:\n" ++
" " ++ fullCmd ++ "\n" ++
" Process exited with code: " ++ show exitCode ++
(if exitCode == ExitFailure (-9)
then " (THIS MAY INDICATE OUT OF MEMORY)"
else "") ++
logLocations ++
(if S.null bs
then ""
Expand Down

0 comments on commit 884e956

Please sign in to comment.