diff options
author | Marc Cornellà <hello@mcornella.com> | 2021-10-05 11:59:09 +0200 |
---|---|---|
committer | Marc Cornellà <hello@mcornella.com> | 2021-10-05 11:59:09 +0200 |
commit | f793baf370bdfcbe3004f7746f3c945feefb56c8 (patch) | |
tree | 494bbea3091fd9eec0bf726ec7403f724afa0698 /plugins/jsontools | |
parent | b621eee21f269498d072ca60823ecde9777821bb (diff) | |
download | zsh-f793baf370bdfcbe3004f7746f3c945feefb56c8.tar.gz zsh-f793baf370bdfcbe3004f7746f3c945feefb56c8.tar.bz2 zsh-f793baf370bdfcbe3004f7746f3c945feefb56c8.zip |
fix(jsontools): fix broken conditional in zsh 5.0.2 (#10262)
Fixes #10262
Diffstat (limited to 'plugins/jsontools')
-rw-r--r-- | plugins/jsontools/jsontools.plugin.zsh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/jsontools/jsontools.plugin.zsh b/plugins/jsontools/jsontools.plugin.zsh index ed45cfa8e..857ca0ec9 100644 --- a/plugins/jsontools/jsontools.plugin.zsh +++ b/plugins/jsontools/jsontools.plugin.zsh @@ -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 |