Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove indentation for error output #5523

Merged
merged 2 commits into from
Apr 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ Other enhancements:
* Added `--candidate` flag to `upload` command to upload a package candidate
rather than publishing the package.

* Error output using `--no-interleaved-output` no longer prepends indentating
whitespace. This allows emacs compilation-mode and vim quickfix to locate
and track errors. See
[#5523](https://github.com/commercialhaskell/stack/pull/5523)

Bug fixes:

* `stack new` now suppports branches other than `master` as default for
Expand Down
4 changes: 2 additions & 2 deletions src/Stack/Types/Build.hs
Original file line number Diff line number Diff line change
Expand Up @@ -356,9 +356,9 @@ showBuildError isBuildingSetup exitCode mtaskProvides execName fullArgs logFiles
logLocations ++
(if null bss
then ""
else "\n\n" ++ doubleIndent (map T.unpack bss))
else "\n\n" ++ removeTrailingSpaces (map T.unpack bss))
where
doubleIndent = dropWhileEnd isSpace . unlines . fmap (\line -> " " ++ line)
removeTrailingSpaces = dropWhileEnd isSpace . unlines
dropQuotes = filter ('\"' /=)

instance Exception StackBuildException
Expand Down