From 912f0f72e5225d38fe73720810def1125573011d Mon Sep 17 00:00:00 2001 From: Ruslan Kuprieiev Date: Sat, 15 Sep 2018 04:17:38 +0300 Subject: [PATCH] run: require at least some arguments Fix #1100 Signed-off-by: Ruslan Kuprieiev --- dvc/cli.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dvc/cli.py b/dvc/cli.py index 3e9a28af4..a00d76b22 100644 --- a/dvc/cli.py +++ b/dvc/cli.py @@ -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