fix: propagate npmrcpath to lockfile shell targets#8407
Merged
olblak merged 6 commits intoApr 17, 2026
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Propagates a configured npmrcpath into generated lockfile-update shell targets by injecting NPM_CONFIG_USERCONFIG, ensuring npm/yarn/pnpm commands use the intended user config.
Changes:
- Add conditional
NPM_CONFIG_USERCONFIGenvironment variable to shell targets when.SourceNpmrcPathis set - Extend autodiscovery tests to assert the manifest includes the new environment variable
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| pkg/plugins/autodiscovery/npm/manifestTemplate.go | Injects NPM_CONFIG_USERCONFIG into generated shell target environments (npm/yarn/pnpm blocks) when npmrcpath is configured |
| pkg/plugins/autodiscovery/npm/main_test.go | Adds assertions verifying the generated manifest includes NPM_CONFIG_USERCONFIG and the configured path |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Author
|
@copilot apply changes based on the comments in this thread |
Member
|
Thank you for the pullrequest. |
loispostula
reviewed
Apr 14, 2026
loispostula
reviewed
Apr 14, 2026
loispostula
reviewed
Apr 14, 2026
loispostula
previously approved these changes
Apr 14, 2026
loispostula
left a comment
Contributor
There was a problem hiding this comment.
Few formatting nit, otherwise looks good! Thanks
olblak
approved these changes
Apr 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #7670
Propagate
npmrcpathto generated shell targets for lockfile updates by addingNPM_CONFIG_USERCONFIGto target environments whennpmrcpathis configured.Test
To test this pull request, you can run the following commands:
Additional Information
Checklist
Tradeoff
npmrcpathis set, so manifests withoutnpmrcpathare unchanged.Potential improvement
TestDiscoverManifestscan assert all lockfile target variants without local tool dependencies.