mirror of
https://github.com/frappe/bench.git
synced 2025-01-09 16:36:25 +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:
|
if existing_dir:
|
||||||
is_compatible = False
|
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:
|
if app.tag is None:
|
||||||
current_remote = (
|
current_remote = (
|
||||||
subprocess.check_output(f"git config branch.{installed_branch}.remote", shell=True, cwd=path_to_app)
|
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
|
is_compatible = default_branch == installed_branch
|
||||||
else:
|
else:
|
||||||
is_compatible = bench.apps.states[repo_name]["resolution"]["branch"] == app.tag
|
is_compatible = installed_branch == app.tag
|
||||||
|
|
||||||
click.secho(
|
click.secho(
|
||||||
f"{'C' if is_compatible else 'Inc'}ompatible version of {repo_name} is already installed",
|
f"{'C' if is_compatible else 'Inc'}ompatible version of {repo_name} is already installed",
|
||||||
|
Loading…
Reference in New Issue
Block a user