reject batch options combined with non-batch options
Reject combinations of --batch (or --batch-keys) with options like --all or --key or with filenames. Most commands ignored the non-batch items when batch mode was enabled. For some reason, addurl and dropkey both processed first the specified non-batch items, followed by entering batch mode. Changed them to also error out, for consistency. Sponsored-by: Dartmouth College's Datalad project
This commit is contained in:
parent
56a12eb84c
commit
835c50966a
19 changed files with 50 additions and 27 deletions
|
@ -93,8 +93,9 @@ seek o = case batchOption o of
|
|||
Batch fmt -> withMessageState $ \s -> case outputType s of
|
||||
JSONOutput _ -> ifM limited
|
||||
( giveup "combining --batch with file matching options is not currently supported"
|
||||
, batchInput fmt parseJSONInput
|
||||
(commandAction . batchCommandStart . startBatch)
|
||||
, batchOnly (keyOptions o) (forFiles o) $
|
||||
batchInput fmt parseJSONInput
|
||||
(commandAction . batchCommandStart . startBatch)
|
||||
)
|
||||
_ -> giveup "--batch is currently only supported in --json mode"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue