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

Documentation suggestion: manipulate atom PATH to include current nvm environment #195

Open
cemerick opened this issue Oct 9, 2018 · 1 comment

Comments

@cemerick
Copy link

cemerick commented Oct 9, 2018

#75 (comment) provided advice to start atom from an nvm-configured shell in order to get the correct $PATH.

An alternative is to capture the $PATH from a shell after being configured by nvm, and use that for process.env.PATH. Adding this to my init.coffee allows me to start Atom per usual from the e.g. ubuntu dock, but still have atom-ide-purescript pick up the installed executables it needs:

require("child_process").exec("bash -c '. ~/.nvm/nvm.sh && echo $PATH'",
  (e, out, err) -> process.env.PATH = out.trim() )

I don't know if that's something that can be safely added to an Atom plugin (probably not), but perhaps might be worth a README / wiki addition.

Thanks for the great plugin! 😄

@nwolverson
Copy link
Owner

Yeah I don't think that kind of magic belongs in a language-specific plugin, but certainly would consider a PATH override as an option.

Feel free to PR some docs on this

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

No branches or pull requests

2 participants