Skip to content

Commit d77832c

Browse files
committed
is_git_repo for a non-existent path should be false
1 parent 9da42ba commit d77832c

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/stack/util.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,5 +213,7 @@ def is_git_repo(path):
213213
try:
214214
_ = git.Repo(path).git_dir
215215
return True
216-
except git.exc.InvalidGitRepositoryError:
217-
return False
216+
except:
217+
pass
218+
219+
return False

0 commit comments

Comments
 (0)