1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-18 03:40:08 +00:00

fix(lib): fix status exit code check in git_prompt_status (#10275)

This commit is contained in:
Pooya Vahidi 2021-10-09 21:02:49 +11:00 committed by GitHub
parent 1c9a64ece6
commit 07cdd7a539
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -206,7 +206,8 @@ function git_prompt_status() {
STASHED UNMERGED AHEAD BEHIND DIVERGED
)
local status_text="$(__git_prompt_git status --porcelain -b 2> /dev/null)"
local status_text
status_text="$(__git_prompt_git status --porcelain -b 2> /dev/null)"
# Don't continue on a catastrophic failure
if [[ $? -eq 128 ]]; then