diff options
author | Joey Hess <joey@kitenet.net> | 2013-07-30 20:24:27 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-07-30 20:24:27 -0400 |
commit | 95b50b5e919bccccca3ae666f4d5e9d1418ca396 (patch) | |
tree | 790a8f014cf2e6c4347cfc64b24428688c8f78fd /Command.hs | |
parent | 8b7b8bcd15d3a8bdd237ba0c0a8c0cb3415a07a1 (diff) |
find: Avoid polluting stdout with progress messages. Closes: #718186
Diffstat (limited to 'Command.hs')
-rw-r--r-- | Command.hs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Command.hs b/Command.hs index 8083e0d7c..fec733f72 100644 --- a/Command.hs +++ b/Command.hs @@ -9,6 +9,7 @@ module Command ( command, noRepo, noCommit, + noMessages, withOptions, next, stop, @@ -40,13 +41,18 @@ import Annex.CheckAttr {- Generates a normal command -} command :: String -> String -> [CommandSeek] -> CommandSection -> String -> Command -command = Command [] Nothing commonChecks False +command = Command [] Nothing commonChecks False False {- Indicates that a command doesn't need to commit any changes to - the git-annex branch. -} noCommit :: Command -> Command noCommit c = c { cmdnocommit = True } +{- Indicates that a command should not output anything other than what + - it directly sends to stdout. (--json can override this). -} +noMessages :: Command -> Command +noMessages c = c { cmdnomessages = True } + {- Adds a fallback action to a command, that will be run if it's used - outside a git repository. -} noRepo :: IO () -> Command -> Command |