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

fix: Handle tag fetching failures of disk mounted App inits

This commit is contained in:
gavin 2022-05-19 12:57:05 +05:30
parent 338df66e48
commit 117d456b16

View File

@ -113,6 +113,10 @@ class AppMeta:
self.tag = self.branch = self.git_repo.active_branch.name
except IndexError:
self.org, self.repo, self.tag = os.path.split(self.mount_path)[-2:] + (self.branch,)
except TypeError:
# faced a "a detached symbolic reference as it points" in case you're in the middle of
# some git shenanigans
self.tag = self.branch = None
def _setup_details_from_name_tag(self):
self.org, self.repo, self.tag = fetch_details_from_tag(self.name)