Skip to content

Commit

Permalink
Make not a git repository check case insensitive
Browse files Browse the repository at this point in the history
Solves olivierverdier#127 (on Ubuntu 18.04 at least
  • Loading branch information
gburger11 authored Nov 7, 2018
1 parent 0a6c8b6 commit ff06e1b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gitstatus.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# change this symbol to whatever you prefer
prehash = ':'

import re
from subprocess import Popen, PIPE

import sys
Expand All @@ -12,7 +13,7 @@

error_string = error.decode('utf-8')

if 'fatal: Not a git repository' in error_string:
if re.search(r'fatal: Not a git repository', error_string, re.IGNORECASE):
sys.exit(0)

branch = branch.decode("utf-8").strip()[11:]
Expand Down

0 comments on commit ff06e1b

Please sign in to comment.