Skip to content
/ dvc Public
forked from iterative/dvc

Commit

Permalink
exp init: hide message about workspace tree on --explicit
Browse files Browse the repository at this point in the history
  • Loading branch information
skshetry committed Nov 3, 2021
1 parent ce6c8a5 commit 6e0dfb9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dvc/repo/experiments/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6e0dfb9

Please sign in to comment.