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

env.npm_execpath and $execPath #42

@NoriSte

Description

@NoriSte

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions