test: retain process.env when overriding NETLIFY vars - #8412
Conversation
The previous code was nuking the entire `process.env` which meant some built-in tools like `os.tmpdir()` would be `undefined` on Windows (as it depends on `env.TEMP` or some such thing existing). We should be able to safely extend the existing env instead of overwriting it.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe build integration test now merges the original process environment with mock API variables before running the build. It no longer replaces the complete environment. Estimated code review effort: 1 (Trivial) | ~2 minutes Mergeability Score: ⚪ Minimal · up to This is a localized test-only change with no actionable merge-blocking risk remaining after normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
commit: |
The previous code was nuking the entire
process.envwhich meant some built-in tools likeos.tmpdir()would beundefinedon Windows (as it depends onenv.TEMPor some such thing existing).We should be able to safely extend the existing env instead of overwriting it.
I suspect this will fix:
https://github.com/netlify/cli/actions/runs/31727425876/job/94549735809#step:10:286
Since that error happens when joining an
undefinedtmpdir.For us to review and ship your PR efficiently, please perform the following steps:
can discuss the changes and get feedback from everyone that should be involved. If you`re fixing a typo or
something that`s on fire 🔥 (e.g. incident related), you can skip this step.
passes our tests.
A picture of a cute animal (not mandatory, but encouraged)