From d277e56121718b65ec062fec356be98f610d1c4e Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Sat, 18 Nov 2023 13:09:19 +0800 Subject: [PATCH] Improve logging by dropping trailing newline --- lib/GHCup/Prelude/Logger/Internal.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/GHCup/Prelude/Logger/Internal.hs b/lib/GHCup/Prelude/Logger/Internal.hs index 446f10e..7b05183 100644 --- a/lib/GHCup/Prelude/Logger/Internal.hs +++ b/lib/GHCup/Prelude/Logger/Internal.hs @@ -80,7 +80,7 @@ logInternal logLevel msg = do Info -> style' "[ Info ]" Warn -> style' "[ Warn ]" Error -> style' "[ Error ]" - let strs = T.split (== '\n') msg + let strs = T.split (== '\n') . T.dropWhileEnd (`elem` ("\n\r" :: String)) $ msg let out = case strs of [] -> T.empty (x:xs) ->