Skip to content

Commit

Permalink
Add tip to scroll up on package build failure.
Browse files Browse the repository at this point in the history
Many users don't get that when they see an error like

    --  While building package hopenssl-2.2.4 using:

they have to scroll up (potentially multiple terminal pages!)
to the last output starting with e.g. `hopenssl >`.

This adds an explicit call to scroll up to that section,
so that this user confusion can be reduced.
  • Loading branch information
nh2 committed Apr 26, 2020
1 parent 8cee2f9 commit b468488
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ Behavior changes:

Other enhancements:

* Build failures now show a hint to scroll up to the corresponding section
[#5279](https://github.com/commercialhaskell/stack/issues/5279)

Bug fixes:


Expand Down
2 changes: 1 addition & 1 deletion src/Stack/Types/Build.hs
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ showBuildError isBuildingSetup exitCode mtaskProvides execName fullArgs logFiles
(True, Nothing) -> "simple Setup.hs"
(True, Just taskProvides') -> "custom Setup.hs for package " ++ dropQuotes (packageIdentifierString taskProvides')
) ++
" using:\n " ++ fullCmd ++ "\n" ++
" (scroll up to its section to see the error) using:\n " ++ fullCmd ++ "\n" ++
" Process exited with code: " ++ show exitCode ++
(if exitCode == ExitFailure (-9)
then " (THIS MAY INDICATE OUT OF MEMORY)"
Expand Down

0 comments on commit b468488

Please sign in to comment.