mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-22 05:40:08 +00:00
fix(jsontools): fix broken conditional in zsh 5.0.2 (#10262)
Fixes #10262
This commit is contained in:
parent
b621eee21f
commit
f793baf370
1 changed files with 2 additions and 2 deletions
|
@ -7,7 +7,7 @@ if [[ -n "$JSONTOOLS_METHOD" ]]; then
|
|||
fi
|
||||
|
||||
# If method undefined, find the first one that is installed
|
||||
if [[ ! -v JSONTOOLS_METHOD ]]; then
|
||||
if [[ -z "$JSONTOOLS_METHOD" ]]; then
|
||||
for JSONTOOLS_METHOD in node python ruby; do
|
||||
# If method found, break out of loop
|
||||
(( $+commands[$JSONTOOLS_METHOD] )) && break
|
||||
|
@ -16,7 +16,7 @@ if [[ ! -v JSONTOOLS_METHOD ]]; then
|
|||
done
|
||||
|
||||
# If no methods were found, exit the plugin
|
||||
[[ -v JSONTOOLS_METHOD ]] || return 1
|
||||
[[ -n "$JSONTOOLS_METHOD" ]] || return 1
|
||||
fi
|
||||
|
||||
# Define json tools for each method
|
||||
|
|
Loading…
Reference in a new issue