global-prefix
global-prefix copied to clipboard
does not work inside Atom (packages)
When using inside Atom (or probably any electron app) the returned path is incorrect if the fallback is used since process.execPath
is not the node executable but instead the electron app:
$ process.execPath
/Applications/Atom.app/Contents/Frameworks/Atom Helper.app/Contents/MacOS/Atom Helper
want to do a pr?
Wouldn't know how to fix this. Just trying to avoid falling back to the fallback function (as a user of this package) could work (I just set the PREFIX ENV variable).
Ok, no prob. I'll look into it more, I believe I saw a solution to this at some point. If someone else notices this issue and has ideas, I would greatly appreciate if you shared them or did a pr. thanks
I confirm that the problem still exists. It is presenting itself in prettier-atom
: https://github.com/prettier/prettier-atom/issues/448
When global modules are installed via NVM, global-modules
(which relies on global-prefix
) returns null.