Skip to content

Commit

Permalink
fix: User messages on get-app actions
Browse files Browse the repository at this point in the history
  • Loading branch information
gavindsouza committed Mar 17, 2022
1 parent d0bd294 commit d33d987
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions bench/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def install(self, skip_assets=False, verbose=False, resolved=False, restart_benc
app_name = get_app_name(self.bench.name, self.repo)
if not resolved and self.repo != "frappe":
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",
)

Expand Down Expand Up @@ -333,9 +333,9 @@ def get_app(

if resolve_deps:
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):
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:
# Todo: Make frappe a terminal dependency for all frappe apps.
Expand Down Expand Up @@ -454,9 +454,10 @@ def install_resolved_deps(
except:
is_compatible = False

prefix = 'C' if is_compatible else 'Inc'
click.secho(
f"{'C' if is_compatible else 'Inc'}ompatible version of {repo_name} is already installed",
fg="yellow",
f"{prefix}ompatible version of {repo_name} is already installed",
fg="green" if is_compatible else "red",
)
app.update_app_state()
continue
Expand Down

0 comments on commit d33d987

Please sign in to comment.