mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-07 07:18:27 +01:00
pipeline: use Dvcfile by default
Fixes #970 Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
+11
-4
@@ -762,14 +762,21 @@ def parse_args(argv=None):
|
||||
help='Output DAG as ASCII.')
|
||||
pipeline_show_parser.add_argument(
|
||||
'targets',
|
||||
nargs='+',
|
||||
help='DVC files.')
|
||||
nargs='*',
|
||||
help="DVC files. 'Dvcfile' by default.")
|
||||
pipeline_show_parser.set_defaults(func=CmdPipelineShow)
|
||||
|
||||
args = parser.parse_args(argv)
|
||||
|
||||
if args.cmd == 'repro' and len(args.targets) == 0:
|
||||
path = os.path.join(args.cwd, 'Dvcfile')
|
||||
if (issubclass(args.func, CmdRepro)
|
||||
or issubclass(args.func, CmdPipelineShow)) \
|
||||
and hasattr(args, 'targets') \
|
||||
and len(args.targets) == 0:
|
||||
if hasattr(args, 'cwd'):
|
||||
cwd = args.cwd
|
||||
else:
|
||||
cwd = os.curdir
|
||||
path = os.path.join(cwd, 'Dvcfile')
|
||||
if not os.path.exists(path):
|
||||
msg = "error: default target '{}' does not exist.\n"
|
||||
sys.stderr.write(msg.format(path))
|
||||
|
||||
Reference in New Issue
Block a user