Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Needs to be able to read the cmd shim that Node.js ships: #4

Open
iarna opened this issue Jun 17, 2018 · 0 comments
Open
Labels
Enhancement new feature or improvement

Comments

@iarna
Copy link
Contributor

iarna commented Jun 17, 2018

As the title says. The one shipped with Node.js looks like this:

@ECHO OFF
SETLOCAL
SET "NODE_EXE=%~dp0\node.exe"
IF NOT EXIST "%NODE_EXE%" (
  SET "NODE_EXE=node"
)
SET "NPM_CLI_JS=%~dp0\node_modules\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\node_modules\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%" %*
@darcyclarke darcyclarke changed the title Needs to be able to read the cmd shim that Node.js ships: [FEATURE] Needs to be able to read the cmd shim that Node.js ships: Jul 28, 2022
@darcyclarke darcyclarke added the Enhancement new feature or improvement label Jul 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement new feature or improvement
Projects
None yet
Development

No branches or pull requests

2 participants