Skip to content

test: normalize the Windows fallback for the answered-prompt tick - #8559

Merged
paulo merged 1 commit into
mainfrom
fix/windows-prompt-snapshot-tick
Oct 5, 2026
Merged

paulo merged 1 commit into
mainfrom
fix/windows-prompt-snapshot-tick

Conversation

@paulo

@paulo paulo commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Summary

This unblocks the release. The release PR's integration run fails on Windows (windows-2025, shard 2/4) in two env:list snapshot tests:

- ? Show values? (y/N)? Show values? (y/N) y✔ Show values? Yes
+ ? Show values? (y/N)? Show values? (y/N) y√ Show values? Yes

Cause: since #8551, prompts come from @inquirer/prompts. It marks answered prompts with ✔, but switches to √ when it detects a terminal without Unicode support. On Windows it decides that from environment variables such as TERM or WT_SESSION. The env:list tests start the CLI with extendEnv: false and only PATH/HOME/APPDATA, so on Windows they get √, while the snapshots were recorded on macOS with ✔. The framework-detection prompt test passes on Windows because it inherits the runner's environment. Pull-request integration checks run only on Ubuntu, so this first appeared in the release run.

Fix: the snapshot normalizer already maps ❯ to its Windows fallback >. This adds the same rule for ✔ → √ and updates the three snapshot lines that contain ✔.

How this was verified

  • env and framework-detection integration tests pass on macOS (40/40).
  • Windows simulation: on macOS, @inquirer/figures also falls back when TERM=linux. I temporarily set that on the two env:list tests (not committed).
    • Without the normalizer, the same 2 tests fail with the snapshot diff from CI.
    • With it, they pass.
  • The Windows run itself only happens in the release workflow, so it'll be confirmed there after merge.

  • Open a bug/issue before writing your code 🧑‍💻
  • Read the contribution guidelines 📖
  • Update or add tests (if any source code was changed or added) 🧪
  • Update or add documentation (if features were changed or added) 📝
  • Make sure the status checks below are successful ✅

@inquirer/prompts marks answered prompts with ✔, but uses √ when it
detects a terminal without Unicode support. On Windows that detection
relies on env vars such as TERM or WT_SESSION, which the env:list
integration tests strip (extendEnv: false), so their snapshots failed on
the Windows runners. Normalize ✔ to √ like the existing ❯ to > rule.
@paulo
paulo requested a review from a team as a code owner October 5, 2026 08:05
@coderabbitai

coderabbitai Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Team
  • Run ID: d1029fc8-8517-4a43-b883-19f68d8a972c
📥 Commits

Reviewing files that changed from the base of the PR and between 7f1c866 and c210b37.

⛔ Files ignored due to path filters (2)
  • tests/integration/__snapshots__/framework-detection.test.ts.snap is excluded by !**/*.snap
  • tests/integration/commands/env/__snapshots__/env.test.ts.snap is excluded by !**/*.snap
📒 Files selected for processing (1)
  • tests/integration/utils/snapshots.ts
 ______________________________________________________________________
< I am here to kick bugs and chew carrots. And I'm all out of carrots. >
 ----------------------------------------------------------------------
  \
   \   \
        \ /\
        ( )
      .( o ).
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown

📊 Benchmark results

Comparing with 7f1c866

  • Dependency count: 1,018 (no change)
  • Package size: 381 MB ⬇️ 0.00% decrease vs. 7f1c866
  • Number of ts-expect-error directives: 331 (no change)

@paulo
paulo enabled auto-merge (squash) October 5, 2026 08:09
@pkg-pr-new

pkg-pr-new Bot commented Oct 5, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/netlify-cli@8559

commit: c210b37

@paulo
paulo merged commit b7cd121 into main Oct 5, 2026
36 of 37 checks passed
@paulo
paulo deleted the fix/windows-prompt-snapshot-tick branch October 5, 2026 08:12
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.

2 participants