Skip to content

Commit d6052ff

Browse files
committed
Check for unscannable .git dir
1 parent 98eb2a8 commit d6052ff

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

git-super-status-parser.py

+2
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,8 @@ def current_git_status(lines):
202202
IOError: There is no `.git` folder in the current folder hierarchy
203203
"""
204204
git_root = find_git_root()
205+
if not os.access(git_root, os.X_OK):
206+
return '.git not readable'
205207
head_file, stash_file, merge_file, rebase_dir = git_paths(git_root)
206208
branch, upstream, local = parse_branch(lines[0], head_file)
207209
remote = parse_ahead_behind(lines[0])

0 commit comments

Comments
 (0)