From c6e6293bb3a93816a2dbc3e19ab48d8b4695b964 Mon Sep 17 00:00:00 2001
From: stuebinm <stuebinm@disroot.org>
Date: Sun, 28 Nov 2021 15:03:28 +0100
Subject: [PATCH] =?UTF-8?q?print=20aeson=20warning=20to=20stderr,=20not=20?=
 =?UTF-8?q?stdout=20=E2=80=A6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/Main.hs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/Main.hs b/src/Main.hs
index 0315be4..d115660 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -21,6 +21,7 @@ import           LintConfig               (LintConfig (..), patch)
 import           Types                    (Level (..))
 import           Util                     (printPretty)
 import           WriteRepo                (writeAdjustedRepository)
+import System.IO (hPutStrLn, stderr)
 
 -- | the options this cli tool can take
 data Options = Options
@@ -87,7 +88,7 @@ printLB a = putStrLn $ C8.unpack $ LB.toStrict a
 -- cf. https://frasertweedale.github.io/blog-fp/posts/2021-10-12-aeson-hash-flooding-protection.html
 aesonWarning :: IO ()
 aesonWarning = case coercionToHashMap of
-  Just _ -> putStrLn
+  Just _ -> hPutStrLn stderr
     "Warning: this program was compiled using an older version of the Aeson Library\n\
     \used for parsing JSON, which is susceptible to hash flooding attacks.\n\
     \n\
-- 
GitLab