mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-13 02:36:32 +03:00
Improve messages in project CLI [ci skip]
This commit is contained in:
parent
49e80dbcac
commit
6316d5f398
|
@ -66,6 +66,7 @@ def project_assets(project_dir: Path, *, sparse_checkout: bool = False) -> None:
|
||||||
branch=asset["git"].get("branch"),
|
branch=asset["git"].get("branch"),
|
||||||
sparse=sparse_checkout,
|
sparse=sparse_checkout,
|
||||||
)
|
)
|
||||||
|
msg.good(f"Downloaded asset {dest}")
|
||||||
else:
|
else:
|
||||||
url = asset.get("url")
|
url = asset.get("url")
|
||||||
if not url:
|
if not url:
|
||||||
|
|
|
@ -59,7 +59,7 @@ def project_run(
|
||||||
for dep in cmd.get("deps", []):
|
for dep in cmd.get("deps", []):
|
||||||
if not (project_dir / dep).exists():
|
if not (project_dir / dep).exists():
|
||||||
err = f"Missing dependency specified by command '{subcommand}': {dep}"
|
err = f"Missing dependency specified by command '{subcommand}': {dep}"
|
||||||
err_help = "Maybe you forgot to run the 'project assets' command?"
|
err_help = "Maybe you forgot to run the 'project assets' command or a previous step?"
|
||||||
err_kwargs = {"exits": 1} if not dry else {}
|
err_kwargs = {"exits": 1} if not dry else {}
|
||||||
msg.fail(err, err_help, **err_kwargs)
|
msg.fail(err, err_help, **err_kwargs)
|
||||||
with working_dir(project_dir) as current_dir:
|
with working_dir(project_dir) as current_dir:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user