Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- setlocal
- set "NODE_EXE=%~dp0\node.exe"
- if not exist "%NODE_EXE%" (
- set "NODE_EXE=node"
- )
- set "NPM_CLI_JS=%~dp0\npm\bin\npm-cli.js"
- for /F "delims=" %%F in ('call "%NODE_EXE%" "%NPM_CLI_JS%" prefix -g') do (
- set "NPM_PREFIX_NPM_CLI_JS=%%F\npm\bin\npm-cli.js"
- )
- if exist "%NPM_PREFIX_NPM_CLI_JS%" (
- set "NPM_CLI_JS=%NPM_PREFIX_NPM_CLI_JS%"
- )
- "%NODE_EXE%" "%NPM_CLI_JS%" %*
Advertisement
Add Comment
Please, Sign In to add comment