atom-ide-purescript
atom-ide-purescript copied to clipboard
Documentation suggestion: manipulate atom PATH to include current nvm environment
https://github.com/nwolverson/atom-ide-purescript/issues/75#issuecomment-213293057 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! :smile:
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