Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing process.env.npm_config_user_agent #251

Open
TenviLi opened this issue Nov 10, 2022 · 0 comments
Open

Missing process.env.npm_config_user_agent #251

TenviLi opened this issue Nov 10, 2022 · 0 comments

Comments

@TenviLi
Copy link

TenviLi commented Nov 10, 2022

How to reproduce this problem?

1⃣️ Add npm script

"print": "node -e 'console.log(process.env)'"

2⃣️ Run npm script with ultra-runner

$ ultra -r --filter '+your/package' npm run print
Result

It will be found that some environment variables of the package manager are missing from the printed environment variables.

3⃣️ Run npm script without ultra-runner

$ cd your/package
$ npm run print
Result

It will be found that some environment variables of the package manager (such as npm_node_execpath, npm_config_user_agent) are appearing from the printed environment variables.

Consequences

The various libraries will not work, which using npm_config_user_agent to determine package manager type, aka only-allow.

https://www.npmjs.com/package/only-allow

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

No branches or pull requests

1 participant