Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions deps/npm/bin/npm
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@
(set -o igncr) 2>/dev/null && set -o igncr; # cygwin encoding fix

basedir=`dirname "$0"`
isexe=0

case `uname` in
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac

NODE_EXE="$basedir/node.exe"
if [ -x "$NODE_EXE" ]; then
isexe=1
fi
if ! [ -x "$NODE_EXE" ]; then
NODE_EXE="$basedir/node"
fi
Expand All @@ -34,4 +38,8 @@ case `uname` in
;;
esac

if [ isexe==1 ] && [ -f "/bin/wslpath" ]; then # normalize back to Windows path
NPM_CLI_JS=`wslpath -w "$NPM_CLI_JS"`
fi

"$NODE_EXE" "$NPM_CLI_JS" "$@"