global-prefix icon indicating copy to clipboard operation
global-prefix copied to clipboard

does not work inside Atom (packages)

Open JaninaWibker opened this issue 7 years ago • 4 comments

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

JaninaWibker avatar Oct 03 '17 12:10 JaninaWibker

want to do a pr?

jonschlinkert avatar Oct 03 '17 13:10 jonschlinkert

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).

JaninaWibker avatar Oct 03 '17 13:10 JaninaWibker

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

jonschlinkert avatar Oct 04 '17 20:10 jonschlinkert

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.

kachkaev avatar Oct 03 '19 10:10 kachkaev