fix(colorize): check if $ZSH_COLORIZE_TOOL exists (#11325)

This commit is contained in:
cxy004 2022-11-10 06:04:55 +08:00 committed by GitHub
parent 9f77cb29d7
commit 23de5d9528
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -23,7 +23,7 @@ colorize_check_requirements() {
if [[ ${available_tools[(Ie)$ZSH_COLORIZE_TOOL]} -eq 0 ]]; then
echo "ZSH_COLORIZE_TOOL '$ZSH_COLORIZE_TOOL' not recognized. Available options are 'pygmentize' and 'chroma'." >&2
return 1
elif (( $+commands["$ZSH_COLORIZE_TOOL"] )); then
elif ! (( $+commands[$ZSH_COLORIZE_TOOL] )); then
echo "Package '$ZSH_COLORIZE_TOOL' is not installed!" >&2
return 1
fi