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

Q? How to prevent Hydrogen from prepending $PATH with lots of node_modules\.bin paths? #1479

Open
kiwi0fruit opened this issue Nov 21, 2018 · 7 comments

Comments

@kiwi0fruit
Copy link
Contributor

How to prevent Hydrogen from prepending $PATH with lots of node_modules\.bin paths?

@BenRussert
Copy link
Member

I dont understand the question, could you elaborate?

@rgbkrk
Copy link
Member

rgbkrk commented Jan 5, 2019

Where does this happen @kiwi0fruit? Can you show the behavior? This doesn't sound right.

@kylebarron
Copy link
Contributor

If I open up a Python file in Atom and run:

import os
os.getenv('PATH')

I get:

'/Users/kyle/tmp/node_modules/.bin:/Users/kyle/node_modules/.bin:/Users/node_modules/.bin:/node_modules/.bin:/Applications/Atom.app/Contents/Frameworks/Atom Helper.app/Contents/MacOS:/Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home/bin:/Users/kyle/local/bin:/Users/kyle/bin:/usr/local/bin:/Applications/Sublime Text.app/Contents/MacOS:/Users/kyle/anaconda/bin:/Applications/Julia-0.6.app/Contents/Resources/julia/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/usr/local/go/bin:/usr/local/MacGPG2/bin:/opt/X11/bin:/Users/kyle/github/go/bin'

I find the same thing in R and Stata kernels as well, so I'm guessing that the PATH is changed in Atom somewhere, and the kernels inherit that.

@kylebarron
Copy link
Contributor

echo $PATH in the directory I opened Atom from gives:

/Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home/bin:/Users/kyle/local/bin:/Users/kyle/bin:/usr/local/bin:/Applications/Sublime Text.app/Contents/MacOS:/Users/kyle/anaconda/bin:/Applications/Julia-0.6.app/Contents/Resources/julia/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/usr/local/go/bin:/usr/local/MacGPG2/bin:/opt/X11/bin:/Users/kyle/github/go/bin

so the added paths are:

/Users/kyle/tmp/node_modules/.bin:/Users/kyle/node_modules/.bin:/Users/node_modules/.bin:/node_modules/.bin:/Applications/Atom.app/Contents/Frameworks/Atom Helper.app/Contents/MacOS

@rgbkrk
Copy link
Member

rgbkrk commented Jan 5, 2019

Does Hydrogen use shell-env underneath? I imagine we put some things in to inherit the user's shell so we can detect the right python etc. environment.

@kiwi0fruit
Copy link
Contributor Author

kiwi0fruit commented Jan 7, 2019 via email

@BenRussert
Copy link
Member

BenRussert commented Feb 9, 2019

This is coming from spawnteract's execa dependency (maybe?)

xref sindresorhus/execa#153

@wadethestealth wadethestealth added awaiting update Waiting for response/new news discussion 💬 Discussion is wanted help wanted Help is desired labels Jun 4, 2019
@wadethestealth wadethestealth added questions ❔ and removed awaiting update Waiting for response/new news discussion 💬 Discussion is wanted help wanted Help is desired labels Oct 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants