From 6e0dfb94e48a75e14ac782b8f663d80f1201de20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Saugat=20Pachhai=20=28=E0=A4=B8=E0=A5=8C=E0=A4=97=E0=A4=BE?= =?UTF-8?q?=E0=A4=A4=29?= Date: Wed, 3 Nov 2021 18:52:36 +0545 Subject: [PATCH] exp init: hide message about workspace tree on --explicit --- dvc/repo/experiments/init.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dvc/repo/experiments/init.py b/dvc/repo/experiments/init.py index 5519485aa..2cc021f9a 100644 --- a/dvc/repo/experiments/init.py +++ b/dvc/repo/experiments/init.py @@ -175,21 +175,21 @@ def init_interactive( ret.update({"cmd": command}) ui.write("Enter the paths for dependencies and outputs of the command.") - if show_tree: + workspace = {**defaults, **provided} + if show_tree and workspace: from rich.tree import Tree tree = Tree( "DVC assumes the following workspace structure:", highlight=True, ) - workspace = {**defaults, **provided} if not live and "live" not in provided: workspace.pop("live", None) for value in sorted(workspace.values()): tree.add(f"[green]{value}[/green]") ui.error_write(tree, styled=True) - ui.error_write() + ui.error_write() ret.update(_prompts(primary, defaults)) ret.update(_prompts(secondary, defaults)) return compact(ret)