From 79f9cedd37dd30ccfa1d4b7147aae1353f42f87c Mon Sep 17 00:00:00 2001 From: Ruslan Kuprieiev Date: Thu, 23 Aug 2018 07:30:37 +0300 Subject: [PATCH] dvc: print command specific help Fixes #1044 Signed-off-by: Ruslan Kuprieiev --- dvc/cli.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dvc/cli.py b/dvc/cli.py index 922762e55..b8b04be72 100644 --- a/dvc/cli.py +++ b/dvc/cli.py @@ -785,7 +785,11 @@ def parse_args(argv=None): cwd = os.curdir path = os.path.join(cwd, 'Dvcfile') if not os.path.exists(path): - parser.error("default target '{}' does not exist.".format(path)) + msg = "default target '{}' does not exist.".format(path) + if issubclass(args.func, CmdRepro): + repro_parser.error(msg) + elif issubclass(args.func, CmdPipelineShow): + pipeline_show_parser.error(msg) args.targets = ['Dvcfile'] return args