diff --git a/ChangeLog.md b/ChangeLog.md index 26bc5f14a6..b270726fa5 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -41,6 +41,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 diff --git a/src/Stack/Types/Build.hs b/src/Stack/Types/Build.hs index 6d03cc62b7..e92c2bf988 100644 --- a/src/Stack/Types/Build.hs +++ b/src/Stack/Types/Build.hs @@ -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