mirror of
https://github.com/frappe/bench.git
synced 2025-01-08 16:14:12 +00:00
fix: empty states json condition
This commit is contained in:
parent
7de1fa7c4d
commit
67df07b732
@ -415,7 +415,11 @@ def install_resolved_deps(
|
||||
if existing_dir:
|
||||
is_compatible = False
|
||||
|
||||
installed_branch = bench.apps.states[repo_name]["resolution"]["branch"].strip()
|
||||
try:
|
||||
installed_branch = bench.apps.states[repo_name]["resolution"]["branch"].strip()
|
||||
except:
|
||||
installed_branch = None
|
||||
|
||||
if app.tag is None:
|
||||
current_remote = (
|
||||
subprocess.check_output(f"git config branch.{installed_branch}.remote", shell=True, cwd=path_to_app)
|
||||
@ -433,7 +437,7 @@ def install_resolved_deps(
|
||||
)
|
||||
is_compatible = default_branch == installed_branch
|
||||
else:
|
||||
is_compatible = bench.apps.states[repo_name]["resolution"]["branch"] == app.tag
|
||||
is_compatible = installed_branch == app.tag
|
||||
|
||||
click.secho(
|
||||
f"{'C' if is_compatible else 'Inc'}ompatible version of {repo_name} is already installed",
|
||||
|
Loading…
Reference in New Issue
Block a user