diff --git a/giti b/giti index 2ad4d75..63ad831 100755 --- a/giti +++ b/giti @@ -30,6 +30,10 @@ else git_status="$(LANGUAGE='en_US.UTF-8 git' git status 2> /dev/null)" git_diff="$(git status --porcelain 2> /dev/null)" # + if [ -z "$git_status" ]; then + # No GIT repository + exit + fi if [[ $SHORT ]]; then if [[ ! $git_status =~ "working tree clean" ]] && [[ ! $git_status =~ "working directory clean" ]]; then git_status_color="$COLOR_RED"