diff options
| author | Joey Hess <joeyh@joeyh.name> | 2017-06-18 16:20:12 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2017-06-18 16:20:12 -0400 |
| commit | 86232b50062b7129da0cac2dd2059fce3db9276b (patch) | |
| tree | 65157d15809189ab7484dc6b55aa08d99b8e133a | |
| parent | 8175581e17251837af83ead18ef937cf2c565f0e (diff) | |
Display error and warning messages to stderr, not stdout.
| -rw-r--r-- | debian/changelog | 6 | ||||
| -rw-r--r-- | src/Propellor/Message.hs | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog index a662c5c6..d26e007c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +propellor (4.0.6) UNRELEASED; urgency=medium + + * Display error and warning messages to stderr, not stdout. + + -- Joey Hess <id@joeyh.name> Sun, 18 Jun 2017 16:19:41 -0400 + propellor (4.0.5) unstable; urgency=medium * Switch cabal file from Extensions to Default-Extensions to fix diff --git a/src/Propellor/Message.hs b/src/Propellor/Message.hs index 97573516..c56f0c5a 100644 --- a/src/Propellor/Message.hs +++ b/src/Propellor/Message.hs @@ -102,7 +102,7 @@ actionMessage' mhn desc a = do warningMessage :: MonadIO m => String -> m () warningMessage s = liftIO $ - outputConcurrent =<< colorLine Vivid Magenta ("** warning: " ++ s) + errorConcurrent =<< colorLine Vivid Magenta ("** warning: " ++ s) infoMessage :: MonadIO m => [String] -> m () infoMessage ls = liftIO $ outputConcurrent $ concatMap (++ "\n") ls @@ -113,7 +113,7 @@ infoMessage ls = liftIO $ outputConcurrent $ concatMap (++ "\n") ls -- property fail. Propellor will continue to the next property. errorMessage :: MonadIO m => String -> m a errorMessage s = liftIO $ do - outputConcurrent =<< colorLine Vivid Red ("** error: " ++ s) + errorConcurrent =<< colorLine Vivid Red ("** error: " ++ s) -- Normally this exception gets caught and is not displayed, -- and propellor continues. So it's only displayed if not -- caught, and so we say, cannot continue. |
