fix --json-progress --json to be same as --json --json-progress
Fix behavior of --json-progress followed by --json, in which the latter option disabled the former. This commit was supported by the NSF-funded DataLad project.
This commit is contained in:
parent
8ccfbd14d0
commit
fa65f1d240
5 changed files with 35 additions and 12 deletions
|
@ -295,18 +295,26 @@ combiningOptions =
|
|||
shortopt o h = globalFlag (Limit.addToken [o]) ( short o <> help h <> hidden )
|
||||
|
||||
jsonOption :: GlobalOption
|
||||
jsonOption = globalFlag (Annex.setOutput (JSONOutput False))
|
||||
jsonOption = globalFlag (Annex.setOutput (JSONOutput jsonoptions))
|
||||
( long "json" <> short 'j'
|
||||
<> help "enable JSON output"
|
||||
<> hidden
|
||||
)
|
||||
where
|
||||
jsonoptions = JSONOptions
|
||||
{ jsonProgress = False
|
||||
}
|
||||
|
||||
jsonProgressOption :: GlobalOption
|
||||
jsonProgressOption = globalFlag (Annex.setOutput (JSONOutput True))
|
||||
jsonProgressOption = globalFlag (Annex.setOutput (JSONOutput jsonoptions))
|
||||
( long "json-progress"
|
||||
<> help "include progress in JSON output"
|
||||
<> hidden
|
||||
)
|
||||
where
|
||||
jsonoptions = JSONOptions
|
||||
{ jsonProgress = True
|
||||
}
|
||||
|
||||
-- Note that a command that adds this option should wrap its seek
|
||||
-- action in `allowConcurrentOutput`.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue