2
0
mirror of https://github.com/frappe/bench.git synced 2024-11-12 08:16:28 +00:00

refactor: added ignore resolution to ignore messages in install app

This commit is contained in:
Aradhya 2022-03-21 14:52:04 +05:30
parent bbca3e9fab
commit 67638b19b7
2 changed files with 13 additions and 4 deletions

View File

@ -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")

View File

@ -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