installer: prefer /usr/bin/node after NodeSource install

This commit is contained in:
Abhimanyu Saharan
2026-02-13 14:15:40 +00:00
parent 01fc50a1d2
commit be11110620

View File

@@ -446,6 +446,12 @@ ensure_nodejs() {
die "Node.js/npm installation failed."
fi
# Refresh command lookup + PATH after install (CI runners often have an older Node in PATH).
hash -r || true
if [[ -x /usr/bin/node ]]; then
export PATH="/usr/bin:$PATH"
fi
node_version="$(node -v || true)"
node_major="${node_version#v}"
node_major="${node_major%%.*}"
@@ -779,4 +785,4 @@ Stop local background services:
SUMMARY
}
main "$@"
main "$@"