Commit addee0f
fix: convert NPM_CONFIG env vars to CLI args in rush-pnpm to prevent npm warnings
In RushPnpmCommandLineParser._executeAsync(), replace NPM_CONFIG_*
environment variables (STORE_DIR, CACHE_DIR, STATE_DIR, WORKSPACE_DIR)
with pnpm CLI arguments (--store-dir, --config.cacheDir, --config.stateDir,
--config.workspaceDir). This prevents these pnpm-specific configuration
values from leaking to npm when pnpm internally delegates to npm libraries
(e.g. during publish operations), which caused "Unknown env config" warnings.
This approach is consistent with how BaseInstallManager already passes
these values via CLI args during rush install/update.
Fixes #5704
Co-authored-by: iclanton <5010588+iclanton@users.noreply.github.com>
Agent-Logs-Url: https://github.com/microsoft/rushstack/sessions/c306dd18-490c-4a52-a3ca-3447740f72801 parent c1dc426 commit addee0f
2 files changed
Lines changed: 19 additions & 5 deletions
File tree
- common/changes/@microsoft/rush
- libraries/rush-lib/src/cli
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
432 | 432 | | |
433 | 433 | | |
434 | 434 | | |
435 | | - | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
436 | 440 | | |
437 | 441 | | |
438 | | - | |
439 | | - | |
440 | | - | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
441 | 445 | | |
442 | 446 | | |
443 | 447 | | |
| |||
473 | 477 | | |
474 | 478 | | |
475 | 479 | | |
476 | | - | |
| 480 | + | |
477 | 481 | | |
478 | 482 | | |
479 | 483 | | |
| |||
0 commit comments