Skip to content

Commit

Permalink
fix: Handle tag fetching failures of disk mounted App inits
Browse files Browse the repository at this point in the history
  • Loading branch information
gavindsouza committed May 19, 2022
1 parent 338df66 commit 117d456
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bench/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ def _setup_details_from_mounted_disk(self):
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)
Expand Down

0 comments on commit 117d456

Please sign in to comment.