Skip to content

Instantly share code, notes, and snippets.

@elieux
Created September 21, 2014 09:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elieux/ee6ba512e9f3b2941ec3 to your computer and use it in GitHub Desktop.
Save elieux/ee6ba512e9f3b2941ec3 to your computer and use it in GitHub Desktop.
MSYS2 NPM "binaries"
#!/bin/sh
basedir=`dirname "$0"`
case `uname` in
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../lib/node_modules/npm/bin/npm-cli.js" "$@"
ret=$?
else
node "$basedir/../lib/node_modules/npm/bin/npm-cli.js" "$@"
ret=$?
fi
exit $ret
@IF EXIST "%~dp0\node.exe" (
"%~dp0\node.exe" "%~dp0\..\lib\node_modules\npm\bin\npm-cli.js" %*
) ELSE (
@SETLOCAL
@SET PATHEXT=%PATHEXT:;.JS;=;%
node "%~dp0\..\lib\node_modules\npm\bin\npm-cli.js" %*
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment