Merge pull request #1646 from YunoHost/ci-auto-update-n-v

Upgrade n to version 9.1.0
This commit is contained in:
Alexandre Aubin 2023-04-28 11:57:52 +02:00 committed by GitHub
commit a129adef20
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

16
helpers/vendor/n/n vendored
View file

@ -61,7 +61,7 @@ function n_grep() {
# Setup and state
#
VERSION="v9.0.1"
VERSION="v9.1.0"
N_PREFIX="${N_PREFIX-/usr/local}"
N_PREFIX=${N_PREFIX%/}
@ -1484,6 +1484,20 @@ function show_diagnostics() {
fi
fi
# Check npm too. Simpler check than for PATH and node, more like the runtime logging for active/installed node.
if [[ -z "${N_PRESERVE_NPM}" ]]; then
printf "\nChecking npm install destination...\n"
local installed_npm="${N_PREFIX}/bin/npm"
local active_npm="$(command -v npm)"
if [[ -e "${active_npm}" && -e "${installed_npm}" && "${active_npm}" != "${installed_npm}" ]]; then
echo_red "There is an active version of npm shadowing the version installed by n. Check order of entries in PATH."
log "installed" "${installed_npm}"
log "active" "${active_npm}"
else
printf "good\n"
fi
fi
printf "\nChecking permissions for cache folder...\n"
# Most likely problem is ownership rather than than permissions as such.
local cache_root="${N_PREFIX}/n"