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

node != nodejs within Debian packages #5201

Closed
rgbkrk opened this issue Feb 23, 2014 · 9 comments · Fixed by #5202
Closed

node != nodejs within Debian packages #5201

rgbkrk opened this issue Feb 23, 2014 · 9 comments · Fixed by #5202
Milestone

Comments

@rgbkrk
Copy link
Member

rgbkrk commented Feb 23, 2014

As part of resolving jupyter/nbviewer#196, (and jupyter/nbviewer#194), @ahmadia and I ended up finding out that Debian based Linux Distributions build the node binary as nodejs.

IPython nbconvert defaults to using node, which is actually ax25-node on Debian based systems. See relevant posting on the Debian mailing list for more.

This won't affect users of nvm (who provide node) or those who build from source. This will affect certain strains of Ubuntu (Saucy Salamander was what I used to test).

@rgbkrk
Copy link
Member Author

rgbkrk commented Feb 23, 2014

ax25-node will typically produce no outputs:

root@qa01:/usr/share/nbviewer# echo 'hi' | node venv/src/ipython/IPython/nbconvert/filters/marked.js
root@qa01:/usr/share/nbviewer# echo 'hi' | nodejs venv/src/ipython/IPython/nbconvert/filters/marked.js
<p>hi</p>

@minrk
Copy link
Member

minrk commented Feb 23, 2014

Awesome.

@minrk minrk added this to the 2.0 milestone Feb 23, 2014
@minrk
Copy link
Member

minrk commented Feb 23, 2014

Can we ignore the node case, and just prefer nodejs and fallback on node? I do not want to handle the case of a system that has node that is not nodejs, that is just not worth our time.

@ahmadia
Copy link
Contributor

ahmadia commented Feb 23, 2014

Can we ignore the node case, and just prefer nodejs and fallback on node? I do not want to handle the case of a system that has node that is not nodejs, that is just not worth our time.

+1

Relevant code is at bottom of IPython/nbconvert/filters/markdown.py

PR or do you want to handle this yourself?

@rgbkrk
Copy link
Member Author

rgbkrk commented Feb 23, 2014

With the right arguments on a user that has ax25-node installed, this could be quite dangerous.

@minrk
Copy link
Member

minrk commented Feb 23, 2014

I'll do it right now.

minrk added a commit to minrk/ipython that referenced this issue Feb 23, 2014
@minrk
Copy link
Member

minrk commented Feb 23, 2014

#5202

@ahmadia
Copy link
Contributor

ahmadia commented Feb 23, 2014

Looks good. With regards to @rgbkrk, I don't know if IPython has a check_call facility, but if you pass node -v to nodejs, you get a version number back, and if you pass it to ax25-node, you get an error. That seems a safe way to check, if more work :/

@rgbkrk
Copy link
Member Author

rgbkrk commented Feb 23, 2014

I think Min's fallback is great.

Since node <marked_path> will always be incorrect to ax25-node, this will be fine. Forgive my alarming "with carefully crafted arguments" statement.

I have yet to get ax25-node to give me anything but error codes (nothing back to STDOUT), even when using ? and --help.

I think I would need more configuration for me to start my amateur radio career tonight.

mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014
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 a pull request may close this issue.

3 participants