Skip to content

Commit f2ec622

Browse files
committed
fix: resolve MINGW64 double-path conversion in install.sh
On Git Bash (MINGW64), the native Windows Node.js binary receives a POSIX path from $SCRIPT_DIR (e.g. /g/projects/everything-claude-code) which Git Bash auto-converts to G:\g\projects\... — doubling the drive letter prefix and producing MODULE_NOT_FOUND errors. Fix: use `cygpath -w` when available to explicitly convert the POSIX path to a proper Windows path before passing it to Node, falling back to the original path on non-MSYS/Cygwin environments.
1 parent ded5d82 commit f2ec622

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

install.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,13 @@ if [ ! -d "$SCRIPT_DIR/node_modules" ]; then
2020
(cd "$SCRIPT_DIR" && npm install --no-audit --no-fund --loglevel=error)
2121
fi
2222

23-
exec node "$SCRIPT_DIR/scripts/install-apply.js" "$@"
23+
# On MSYS2/Git Bash, convert the POSIX path to a Windows path so Node.js
24+
# (a native Windows binary) receives a valid path instead of a doubled one
25+
# like G:\g\projects\... that results from Git Bash's auto path conversion.
26+
if command -v cygpath &>/dev/null; then
27+
NODE_SCRIPT="$(cygpath -w "$SCRIPT_DIR/scripts/install-apply.js")"
28+
else
29+
NODE_SCRIPT="$SCRIPT_DIR/scripts/install-apply.js"
30+
fi
31+
32+
exec node "$NODE_SCRIPT" "$@"

0 commit comments

Comments
 (0)