Repository navigation
fix: forward process.env to child process - #8777
Merged
Merged
Conversation
🦋 Changeset detectedLatest commit: 9d47d1e The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
process.env to child processprocess.env to child process
Member
Author
|
gonna rush this out since it's a high priority regression |
Merged
teemingc
added a commit
that referenced
this pull request
Nov 18, 2026
Fixes "#17617" Build workers unconditionally replaced the inherited FORCE_COLOR with '1'. Consequently, setting NO_COLOR caused Node to warn about conflicting settings during otherwise successful builds, and explicit color-disable/depth settings were lost. The forced-color default was introduced with improved diagnostics in #16374. It still serves a purpose: worker output does not otherwise retain terminal color detection. Removing it entirely would regress those diagnostics. Instead, only add the FORCE_COLOR default when the parent hasn't disabled colors with a non-empty NO_COLOR, and pass everything the parent sets through unchanged. An explicit FORCE_COLOR (including 0) is preserved, and when the parent sets both variables the worker gets both, so it resolves colors the same way the parent does. An empty NO_COLOR counts as unset, matching Node and the NO_COLOR spec. This central change covers route analysis, prerendering, and fallback generation. It preserves environment inheritance from #8777, worker_threads compatibility from #9919, and the cleanup/exit-handler behavior from #17135. Regression coverage uses the existing real-worker fixture rather than mocking worker construction. - [Ported SvelteLab reproduction](https://www.sveltelab.dev/#code=N4IgDghgxg1hDmBTAdAKwM4HsB2IBcoAZgJYA2i%2BoUOALotjeviMADras2sjYQC2ibngAE3GMRoBabJknVSmAE6SA7hEXZi2eNwA07TtzCLiANwh0hwmooCuifRy4hTiRemI4r3AAzI-AIx6Bs40AJ5ggviiIHyYACa25MFO3OhQJmCMVmypzvGIpt4uEojCBUUgjobOAEa2ZPHFpqXC9Y0pNUaKhcSIKs2txr39nVzOw5A9xeiupHSS4jTC6GHYUMIAPpvCiFAAFpjCAOTHY4Yg7aTxeDJymAqKxQByAPIA%2BgDCrwAyrwBKAF4AsIWnQ2g1rtwQgBfar5QoAEUQkWwBXWfXQORCFwAArNEPNE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6I9duIXACUbstyL2Awi3tu9jCQA). Run build:no-color to reproduce the build warning with the pinned release. <!-- svelte-triage-bot:feedback-baseline:34a9e93738cd15903cc13bc4509c9647dd9d9238 --> --------- Co-authored-by: svelte-triage-bot <[email protected]> Co-authored-by: Tee Ming <[email protected]>
This branch was successfully deployed
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.
closes #8769. no test because i'm in a hurry, but i don't think it needs one honestly — this is fairly self-explanatory code
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm testand lint the project withpnpm lintandpnpm checkChangesets
pnpm changesetand following the prompts. Changesets that add features should beminorand those that fix bugs should bepatch. Please prefix changeset messages withfeat:,fix:, orchore:.