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

shebang magic #45

Merged
merged 2 commits into from
Mar 10, 2014
Merged

shebang magic #45

merged 2 commits into from
Mar 10, 2014

Conversation

springmeyer
Copy link
Contributor

Attempt to support debian systems which have renamed node to nodejs

Trying to fix TryGhost/node-sqlite3#256

To avoid errors like:

npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

README.Debian states:

nodejs command
--------------

The upstream name for the Node.js interpreter command is "node".
In Debian the interpreter command has been changed to "nodejs".

This was done to prevent a namespace collision: other commands use
the same name in their upstreams, such as ax25-node from the "node"
package.

Scripts calling Node.js as a shell command must be changed to instead
use the "nodejs" command.

springmeyer pushed a commit that referenced this pull request Mar 10, 2014
@springmeyer springmeyer merged commit cd5e000 into master Mar 10, 2014
@springmeyer
Copy link
Contributor Author

ugh, this completely breaks windows since cmd-shim re-writes the shebang into /bin/sh.exe which does not work on windows and instead should be node.exe:

cmd-shim writes this:

@IF EXIST "%~dp0\/bin/sh.exe" (
  "%~dp0\/bin/sh.exe"  "%~dp0\..\node-pre-gyp\bin\node-pre-gyp" %*
) ELSE (
  /bin/sh  "%~dp0\..\node-pre-gyp\bin\node-pre-gyp" %*
)

@springmeyer
Copy link
Contributor Author

reverted in a9d0e53

@springmeyer
Copy link
Contributor Author

reason this was reverted is that I'm considering systems that don't provide node as broken. Based on this logic: TryGhost/node-sqlite3#256 (comment) and nodejs/nan#70

@springmeyer springmeyer deleted the ubuntu-nodejs-bin branch September 8, 2017 00:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tell the author that this fails on your system: node-pre-gyp install --fallback-to-build
1 participant