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:
parent
ff2eeaf054
commit
2343f99c85
11 changed files with 117 additions and 59 deletions
|
@ -17,6 +17,7 @@ import Config.Cost
|
|||
import Annex.UUID
|
||||
import Remote.Helper.Special
|
||||
import Utility.Env
|
||||
import Messages.Progress
|
||||
|
||||
import qualified Data.Map as M
|
||||
|
||||
|
@ -113,7 +114,7 @@ runHook hook action k f a = maybe (return False) run =<< lookupHook hook action
|
|||
where
|
||||
run command = do
|
||||
showOutput -- make way for hook output
|
||||
ifM (liftIO $ boolSystemEnv "sh" [Param "-c", Param command] =<< hookEnv action k f)
|
||||
ifM (progressCommandEnv "sh" [Param "-c", Param command] =<< liftIO (hookEnv action k f))
|
||||
( a
|
||||
, do
|
||||
warning $ hook ++ " hook exited nonzero!"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue