From af3c871632843ffb8c8d0e78de097e15f0b8fd1e Mon Sep 17 00:00:00 2001 From: saxenabhishek Date: Fri, 11 Mar 2022 13:34:54 +0530 Subject: [PATCH] fix: missing installed branch --- bench/app.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/bench/app.py b/bench/app.py index b9e5e80a..80d75410 100755 --- a/bench/app.py +++ b/bench/app.py @@ -418,8 +418,14 @@ def install_resolved_deps( try: installed_branch = bench.apps.states[repo_name]["resolution"]["branch"].strip() except: - installed_branch = None - + installed_branch = ( + subprocess. + check_output("git rev-parse --abbrev-ref HEAD", shell=True, cwd=path_to_app) + .decode("utf-8") + .rstrip() + ) + + if app.tag is None: current_remote = ( subprocess.check_output(f"git config branch.{installed_branch}.remote", shell=True, cwd=path_to_app)