mirror of
https://github.com/frappe/bench.git
synced 2025-01-09 16:36:25 +00:00
fix: User messages on get-app actions
This commit is contained in:
parent
d0bd294dc2
commit
d33d987b2c
11
bench/app.py
11
bench/app.py
@ -184,7 +184,7 @@ class App(AppMeta):
|
|||||||
app_name = get_app_name(self.bench.name, self.repo)
|
app_name = get_app_name(self.bench.name, self.repo)
|
||||||
if not resolved and self.repo != "frappe":
|
if not resolved and self.repo != "frappe":
|
||||||
click.secho(
|
click.secho(
|
||||||
f"Ignoring dependencies of {self.name} to install dependencies use --resolve-deps",
|
f"Ignoring dependencies of {self.name}. To install dependencies use --resolve-deps",
|
||||||
fg="yellow",
|
fg="yellow",
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -333,9 +333,9 @@ def get_app(
|
|||||||
|
|
||||||
if resolve_deps:
|
if resolve_deps:
|
||||||
resolution = make_resolution_plan(app, bench)
|
resolution = make_resolution_plan(app, bench)
|
||||||
click.secho("Following apps will be installed", fg="yellow")
|
click.secho("Following apps will be installed", fg="bright_blue")
|
||||||
for idx, app in enumerate(reversed(resolution.values()), start=1):
|
for idx, app in enumerate(reversed(resolution.values()), start=1):
|
||||||
print(f"{idx}. {app.name} {f'required by {app.required_by}' if app.required_by else ''}")
|
print(f"{idx}. {app.name} {f'(required by {app.required_by})' if app.required_by else ''}")
|
||||||
|
|
||||||
if "frappe" in resolution:
|
if "frappe" in resolution:
|
||||||
# Todo: Make frappe a terminal dependency for all frappe apps.
|
# Todo: Make frappe a terminal dependency for all frappe apps.
|
||||||
@ -454,9 +454,10 @@ def install_resolved_deps(
|
|||||||
except:
|
except:
|
||||||
is_compatible = False
|
is_compatible = False
|
||||||
|
|
||||||
|
prefix = 'C' if is_compatible else 'Inc'
|
||||||
click.secho(
|
click.secho(
|
||||||
f"{'C' if is_compatible else 'Inc'}ompatible version of {repo_name} is already installed",
|
f"{prefix}ompatible version of {repo_name} is already installed",
|
||||||
fg="yellow",
|
fg="green" if is_compatible else "red",
|
||||||
)
|
)
|
||||||
app.update_app_state()
|
app.update_app_state()
|
||||||
continue
|
continue
|
||||||
|
Loading…
Reference in New Issue
Block a user