run: require at least some arguments

Fix #1100

Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
Ruslan Kuprieiev
2018-09-15 04:54:26 +03:00
parent 5730b1d088
commit 912f0f72e5
+8
View File
@@ -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