Skip to content
This repository has been archived by the owner on Aug 11, 2021. It is now read-only.

env.npm_execpath and $execPath #42

Open
NoriSte opened this issue Oct 18, 2019 · 0 comments
Open

env.npm_execpath and $execPath #42

NoriSte opened this issue Oct 18, 2019 · 0 comments

Comments

@NoriSte
Copy link

NoriSte commented Oct 18, 2019

Hi
An issue found when working on my nprr package and npm-run-all makes me open this issue.

It seems that the env.npm_execpath is set to require.main.filename "instead" of $execPath (used instead to set env.npm_node_execpath). I don't know if it's right or not and I'm not aware of all the possible side-effects of changing it.

The original problem comes from my nprr package that runs a package.json script through npm.run()(by importing npm itself). Here's the code that does that.

The "guilty" LOC of this project:

env.npm_execpath = require.main.filename

Original issue: mysticatea/npm-run-all#181

I think that the correct label for this issue should be "support".

Thank you for all
Stefano

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant