fix: syntax error when checking for realpath command (#259)

Closes #257
This commit is contained in:
Yusei Ueno 2022-05-09 10:40:20 +09:00 committed by GitHub
parent b6f286b2c7
commit 05559ebdbc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1190,7 +1190,7 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
"${${(M)OPTS[opt_-q,--quiet]:#1}:+, skip the -q/--quiet option for more information}.{rst}"; retval=4; }
}
} else {
if (( $+commands[realpath] )) && {
if (( $+commands[realpath] )) {
local rpv="$(realpath --version | head -n1 | sed -E 's/realpath (\(.*\))?//g')"
if is-at-least 8.23 $rpv; then
rel_url="$(realpath --relative-to="$local_dir/$dirname" "$url")" && \