mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-26 15:28:28 +01:00
run: require at least some arguments
Fix #1100 Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
@@ -805,4 +805,12 @@ def parse_args(argv=None):
|
||||
pipeline_show_parser.error(msg)
|
||||
args.targets = ['Dvcfile']
|
||||
|
||||
if issubclass(args.func, CmdRun) \
|
||||
and len(args.deps) == 0 \
|
||||
and len(args.outs) == 0 \
|
||||
and len(args.outs_no_cache) == 0 \
|
||||
and len(args.command) == 0:
|
||||
run_parser.error("Too few arguments. Specify at least one: "
|
||||
"'-d', '-o', '-O', 'command'.")
|
||||
|
||||
return args
|
||||
|
||||
Reference in New Issue
Block a user