From 67638b19b70f7159679173b96dd0175ed51f3a1d Mon Sep 17 00:00:00 2001 From: Aradhya Date: Mon, 21 Mar 2022 14:52:04 +0530 Subject: [PATCH] refactor: added ignore resolution to ignore messages in install app --- bench/app.py | 13 ++++++++++--- bench/bench.py | 4 +++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/bench/app.py b/bench/app.py index 78244347..043c7c8e 100755 --- a/bench/app.py +++ b/bench/app.py @@ -176,13 +176,20 @@ class App(AppMeta): shutil.move(active_app_path, archived_app_path) @step(title="Installing App {repo}", success="App {repo} Installed") - def install(self, skip_assets=False, verbose=False, resolved=False, restart_bench=True): + def install( + self, + skip_assets=False, + verbose=False, + resolved=False, + restart_bench=True, + ignore_resolution=False, + ): import bench.cli from bench.utils.app import get_app_name verbose = bench.cli.verbose or verbose app_name = get_app_name(self.bench.name, self.repo) - if not resolved and self.repo != "frappe": + if not resolved and self.repo != "frappe" and not ignore_resolution: click.secho( f"Ignoring dependencies of {self.name}. To install dependencies use --resolve-deps", fg="yellow", @@ -195,7 +202,7 @@ class App(AppMeta): verbose=verbose, skip_assets=skip_assets, restart_bench=restart_bench, - resolution = self.local_resolution + resolution=self.local_resolution ) @step(title="Cloning and installing {repo}", success="App {repo} Installed") diff --git a/bench/bench.py b/bench/bench.py index 0baa47a4..b0f6d50f 100644 --- a/bench/bench.py +++ b/bench/bench.py @@ -392,7 +392,9 @@ class BenchSetup(Base): print(f"Installing {len(apps)} applications...") for app in apps: - App(app, bench=self.bench, to_clone=False).install( skip_assets=True, restart_bench=False) + App(app, bench=self.bench, to_clone=False).install( + skip_assets=True, restart_bench=False, ignore_resolution=True + ) def python(self, apps=None): """Install and upgrade Python dependencies for specified / all installed apps on given Bench