well along the way to fully quiet --quiet

Came up with a generic way to filter out progress messages while keeping
errors, for commands that use stderr for both.

--json mode will disable command outputs too.
This commit is contained in:
Joey Hess 2015-04-04 14:34:03 -04:00
parent ff2eeaf054
commit 2343f99c85
11 changed files with 117 additions and 59 deletions

View file

@ -106,8 +106,8 @@ rsyncHelper m params = do
a <- case m of
Nothing -> return $ rsync params
Just meter -> do
h <- mkProgressHandler meter
return $ rsyncProgress h params
oh <- mkOutputHandler
return $ rsyncProgress oh meter params
ifM (liftIO a)
( return True
, do