fix: correct SCRIPT_DIR detection for zsh compatibility in install-node.sh

The redundant SCRIPT_DIR assignment on line 20 used ${BASH_SOURCE[0]:-} which
would expand to an empty string in zsh, causing dirname "" to return the current
directory instead of the script's directory. This led to script failures when
not run from its own directory.

Since SCRIPT_DIR is already correctly set earlier (lines 11-15) with proper
zsh handling, the redundant line has been removed.
This commit is contained in:
Peter Steinberger 2025-07-06 03:38:47 +01:00
parent c8389850a2
commit 2f829215bc

View file

@ -17,7 +17,6 @@ fi
echo "Checking for Node.js..."
# Load Node.js environment managers (Homebrew, nvm, Volta, fnm)
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]:-}" )" && pwd )"
source "${SCRIPT_DIR}/node-path-setup.sh"
# Check if Node.js is available