... | ... |
@@ -16,7 +16,7 @@ function git_prompt_info() { |
16 | 16 |
} |
17 | 17 |
|
18 | 18 |
parse_git_dirty () { |
19 |
- if [[ $(git status | tail -n1) != "nothing to commit (working directory clean)" ]]; then |
|
19 |
+ if [[ $((git status &> /dev/null) | tail -n1) != "nothing to commit (working directory clean)" ]]; then |
|
20 | 20 |
echo "$ZSH_THEME_GIT_PROMPT_DIRTY" |
21 | 21 |
else |
22 | 22 |
echo "$ZSH_THEME_GIT_PROMPT_CLEAN" |