File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 44
55set -euo pipefail
66
7+ if [ -z " ${HOME:- } " ]; then
8+ printf ' \nERROR: HOME is not set. Set it to your home directory and re-run this script.\n\n' >&2
9+ exit 1
10+ fi
11+
712NVM_VERSION=" ${NVM_VERSION:- v0.40.3} "
813
914error () {
@@ -70,10 +75,13 @@ install_node_via_nvm() {
7075}
7176
7277ensure_node () {
73- if require_cmd node; then
74- info " Node.js is already installed: $( command -v node) ($( node --version) )"
78+ if require_cmd node && require_cmd npm && require_cmd corepack ; then
79+ info " Node.js is already installed: $( command -v node) ($( node --version) ), npm $( npm --version ) "
7580 return 0
7681 fi
82+ if require_cmd node; then
83+ error " Node.js is on PATH but this installer also requires npm and Corepack (corepack). Install a full Node.js toolchain, then re-run."
84+ fi
7785 install_node_via_nvm
7886}
7987
You can’t perform that action at this time.
0 commit comments