diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-04-04 14:53:17 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-04-04 14:54:03 -0400 |
commit | 8815f95d1ad0413ca35e6873f4b7b272bac629db (patch) | |
tree | 00701e81efc5d7725d28e8fe68754fe778312188 /Messages | |
parent | 092e6b0f3f61ad3ede912a00bbbeb635ab9bc267 (diff) |
relay external special remote stderr through progress suppression machinery (eep!)
It sounds worse than it is. ;)
Some external special remotes may run commands that display progress on
stderr. If git-annex is run with --quiet, this should filter out such
displays while letting the errors through.
Diffstat (limited to 'Messages')
-rw-r--r-- | Messages/Progress.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Messages/Progress.hs b/Messages/Progress.hs index 24efe0156..e3df73ea4 100644 --- a/Messages/Progress.hs +++ b/Messages/Progress.hs @@ -70,6 +70,12 @@ mkOutputHandler = OutputHandler <$> commandProgressDisabled <*> mkStderrEmitter +mkStderrRelayer :: Annex (Handle -> IO ()) +mkStderrRelayer = do + quiet <- commandProgressDisabled + emitter <- mkStderrEmitter + return $ \h -> avoidProgress quiet h emitter + {- Generates an IO action that can be used to emit stderr. - - When a progress meter is displayed, this takes care to avoid |