dist-url option in environment variable not working as expected
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 10.7k
- Forks
- 1.9k
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 5
Description
- Node Version: node v14.14.0, npm v6.14.8
- Platform: Darwin
- Compiler: Apple clang version 12.0.0 (clang-1200.0.32.2)
- Module: robotjs (does not really matter)
The document says:
Use the form
npm_config_OPTION_NAMEfor any of the command options listed above (dashes in option names should be replaced by underscores).
But dist-url does not work this way:
export npm_config_dist_url=xxx
because what we get from the above is gyp.opts.dist_url but the code is using other forms:
However it works when keeping or removing the dash:
# environment variable with dash is not valid to export
$ env npm_config_dist-url=xxx node-gyp
Should dist_url also be supported as described in the document? Thanks.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with lib/process-release.js at the linked reference and compare its option lookup with the documented npm_config_DIST option naming. Reproduce the behavior using the provided environment-variable examples, then verify that the underscore form is handled consistently with the documentation. No test file is named in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100