Skip to content

Commit

Permalink
fix(lib): fix status exit code check in git_prompt_status (ohmyzsh#…
Browse files Browse the repository at this point in the history
  • Loading branch information
pooyavahidi authored and kareefardi committed Oct 27, 2021
1 parent eb7e885 commit 0990688
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/git.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0990688

Please sign in to comment.