2022-01-26 17:13:10 +01:00
|
|
|
if (( ! $+commands[npx] )); then
|
|
|
|
return
|
|
|
|
fi
|
2017-11-06 15:48:56 +01:00
|
|
|
|
2022-01-26 17:13:10 +01:00
|
|
|
if ! npx_fallback_script="$(npx --shell-auto-fallback zsh 2>/dev/null)"; then
|
|
|
|
print -u2 ${(%):-"%F{yellow}This \`npx\` version ($(npx --version)) is not supported.%f"}
|
|
|
|
else
|
|
|
|
source <(<<< "$npx_fallback_script")
|
|
|
|
fi
|
|
|
|
|
|
|
|
print -u2 ${(%):-"%F{yellow}The \`npx\` plugin is deprecated and will be removed soon. %BPlease disable it%b.%f"}
|
|
|
|
unset npx_fallback_script
|