diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-01-20 14:07:13 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-01-20 14:10:13 -0400 |
commit | 0c4e0046e72aab8216e3fe7d3f4252b1a66e1211 (patch) | |
tree | b977261e78042cc6b11d530578a47a0d25d21359 /CmdLine | |
parent | b51672003cf035ba4595f45746cac343d154266f (diff) |
make noMessages disable closing of json object in --json mode
This allows things like Command.Find to use noMessages and generate their
own complete json objects. Previouly, Command.Find managed that only via a
hack, which wasn't compatable with batch mode.
Only Command.Find, Command.Smudge, and Commange.Status use noMessages
currently, and none except for Command.Find are impacted by this change.
Fixes find --json --batch output
Diffstat (limited to 'CmdLine')
-rw-r--r-- | CmdLine/Action.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/CmdLine/Action.hs b/CmdLine/Action.hs index 693a6814f..b9fbf166e 100644 --- a/CmdLine/Action.hs +++ b/CmdLine/Action.hs @@ -124,7 +124,7 @@ includeCommandAction a = account =<< tryIO (callCommandAction a) account (Right False) = incerr account (Left err) = do toplevelWarning True (show err) - showEndFail + implicitMessage showEndFail incerr incerr = do Annex.incError @@ -146,8 +146,8 @@ callCommandAction' = start cleanup = stage $ status stage = (=<<) skip = return Nothing - failure = showEndFail >> return (Just False) - status r = showEndResult r >> return (Just r) + failure = implicitMessage showEndFail >> return (Just False) + status r = implicitMessage (showEndResult r) >> return (Just r) {- Do concurrent output when that has been requested. -} allowConcurrentOutput :: Annex a -> Annex a |