mac node bin

This commit is contained in:
shocknet-justin 2025-11-27 01:00:11 -05:00
parent 0baa343c3e
commit 39466ef4a7

View file

@ -14,9 +14,11 @@ install_nodejs() {
} }
install_nodejs_mac() { install_nodejs_mac() {
local NODE_BIN="$USER_HOME/node/bin/node"
# Check if node exists and meets minimum version # Check if node exists and meets minimum version
if command -v node &> /dev/null; then if [ -x "$NODE_BIN" ]; then
NODE_VERSION=$(node -v | sed 's/v//') NODE_VERSION=$("$NODE_BIN" -v | sed 's/v//')
if [ "$(printf '%s\n' "$MINIMUM_VERSION" "$NODE_VERSION" | sort -V | awk 'NR==1')" = "$MINIMUM_VERSION" ]; then if [ "$(printf '%s\n' "$MINIMUM_VERSION" "$NODE_VERSION" | sort -V | awk 'NR==1')" = "$MINIMUM_VERSION" ]; then
log "Node.js is already installed and meets the minimum version requirement." log "Node.js is already installed and meets the minimum version requirement."
return 0 return 0