Skip to content

Commit 443c974

Browse files
committed
Fix: cmd configure -l bug; improve cmd download message
1 parent 91f2787 commit 443c974

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

dataherb/command.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ def configure(show, locate):
5858
home = Path.home()
5959
config_path = home / ".dataherb" / "config.json"
6060

61-
if not show:
61+
if locate:
62+
click.launch(str(config_path.parent))
63+
elif not show:
6264
if config_path.exists():
6365
is_overwite = click.confirm(
6466
click.style(
@@ -131,9 +133,6 @@ def configure(show, locate):
131133
)
132134
click.secho(f"The above config is extracted from {config_path}")
133135

134-
if locate:
135-
click.launch(str(config_path.parent))
136-
137136

138137
@dataherb.command()
139138
@click.option(
@@ -279,10 +278,10 @@ def download(id, flora, workdir):
279278
click.echo(f"Could not find dataset with id {id}")
280279
else:
281280
result_metadata = result.metadata
282-
click.echo(f'Downloading DataHerb ID: {result_metadata.get("id")}')
283281
result_uri = result_metadata.get("uri")
284282
result_id = result_metadata.get("id")
285283
dest_folder = str(Path(workdir) / result_id)
284+
click.echo(f'Downloading DataHerb ID: {result_metadata.get("id")} into {dest_folder}')
286285
if os.path.exists(dest_folder):
287286
click.echo(f"Can not download dataset to {dest_folder}: folder exists.\n")
288287

0 commit comments

Comments
 (0)