From 117d456b16289f8a715c608a1265dd9a59368247 Mon Sep 17 00:00:00 2001 From: gavin Date: Thu, 19 May 2022 12:57:05 +0530 Subject: [PATCH] fix: Handle tag fetching failures of disk mounted App inits --- bench/app.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bench/app.py b/bench/app.py index 3cc35631..815f4b1d 100755 --- a/bench/app.py +++ b/bench/app.py @@ -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)