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

With zsh 5.4 a simple "local FLAGS" meant as an array must be explicitly declared so. This fix avoids the dreaded "parse_git_dirty:3: FLAGS: attempt to assign array value to non-array". (#6414)

This commit is contained in:
catull 2017-11-14 15:36:53 +01:00 committed by Robby Russell
parent 510d90749f
commit d792b1114c

View file

@ -11,7 +11,7 @@ function git_prompt_info() {
# Checks if working tree is dirty
function parse_git_dirty() {
local STATUS=''
local FLAGS
local -a FLAGS
FLAGS=('--porcelain')
if [[ "$(command git config --get oh-my-zsh.hide-dirty)" != "1" ]]; then
if [[ $POST_1_7_2_GIT -gt 0 ]]; then