diff --git a/eden/hosting.py b/eden/hosting.py index 187280c..86ef4bb 100644 --- a/eden/hosting.py +++ b/eden/hosting.py @@ -461,10 +461,13 @@ def get_identity(): """ Returns name and active commit hash of the generator """ - - repo = git.Repo(search_parent_directories=True) - name = repo.remotes.origin.url.split('.git')[0].split('/')[-1] - sha = repo.head.object.hexsha + try: + repo = git.Repo(search_parent_directories=True) + name = repo.remotes.origin.url.split('.git')[0].split('/')[-1] + sha = repo.head.object.hexsha + except git.exc.InvalidGitRepositoryError: + name = "repo-less-eden" + sha = "none" response = { "name": name,