Skip to content

Commit

Permalink
fix print warning function
Browse files Browse the repository at this point in the history
  • Loading branch information
mattpolzin committed Jan 8, 2024
1 parent febca2c commit cd5cf3b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/Main.idr
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,13 @@ printWarning : HasIO io =>
String
-> io ()
printWarning warning =
do stderrColors <- isTTY stderr
if stderrColors
then ignore $ fPutStrLn stderr . renderString . layoutPretty defaultLayoutOptions . annotate (color Yellow) . pretty $ trim warning
else ignore $ fPutStrLn stderr warning
exitFailure
if !(isTTY stderr)
then do
ignore $ fPutStrLn stderr . renderString . layoutPretty defaultLayoutOptions . annotate (color Yellow) . pretty $ trim warning
ignore $ fPutStrLn stderr ""
else do
ignore $ fPutStrLn stderr warning
ignore $ fPutStrLn stderr ""

covering
bashCompletion : HasIO io =>
Expand Down

0 comments on commit cd5cf3b

Please sign in to comment.