Skip to content

test(cli): strip inherited color vars from the CLI child env - #4

Merged
Alex-Dolid merged 1 commit into
mainfrom
fix/cli-tests-color-env
Oct 4, 2026
Merged

Alex-Dolid merged 1 commit into
mainfrom
fix/cli-tests-color-env

Conversation

@Alex-Dolid

Copy link
Copy Markdown

node --test sets FORCE_COLOR=1 for its test files when its own stdout is a color TTY. runCli spread process.env into the CLI child, so an interactive pnpm test / pnpm publish colorized the CLI's tables and three converge tests matching plain table text failed locally while CI stayed green.

runCli now starts from process.env minus FORCE_COLOR, NO_COLOR, MIGRONAUT_FORCE_COLOR and MIGRONAUT_NO_COLOR; tests that want color pass the variables explicitly.

`node --test` sets FORCE_COLOR=1 for its test files when its own stdout is
a color TTY. runCli spread process.env into the CLI child, so an interactive
`pnpm test` / `pnpm publish` colorized the CLI's tables and three converge
tests matching plain table text failed locally while CI stayed green.

runCli now starts from process.env minus FORCE_COLOR, NO_COLOR,
MIGRONAUT_FORCE_COLOR and MIGRONAUT_NO_COLOR; tests that want color pass
the variables explicitly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
migronaut Ready Ready Preview Oct 4, 2026 10:49am UTC

@Alex-Dolid
Alex-Dolid merged commit 0e0e83c into main Oct 4, 2026
12 checks passed
@Alex-Dolid
Alex-Dolid deleted the fix/cli-tests-color-env branch October 4, 2026 10:53

This branch was successfully deployed

1 active deployment
Preview — 4aca01b9 Deployed Oct 4, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant