Skip to content

fix: resolve vp --version showing v0.0.0 on Windows#767

Merged
fengmk2 merged 4 commits intomainfrom
fix-windows-version
Mar 10, 2026
Merged

fix: resolve vp --version showing v0.0.0 on Windows#767
fengmk2 merged 4 commits intomainfrom
fix-windows-version

Conversation

@fengmk2
Copy link
Copy Markdown
Member

@fengmk2 fengmk2 commented Mar 10, 2026

Summary

  • Add shell: bash to the "Set binding version" and "Verify version replacement" steps in the release workflow, fixing PowerShell quoting issues that caused replace-file-content to silently fail on Windows runners
  • Add a verification step after version replacement to catch silent failures early
  • Enable the replace-file-content snap test on win32 (remove ignoredPlatforms)

Root Cause

The build-rust job in release.yml runs on windows-latest without specifying a shell, so GitHub Actions defaults to PowerShell. PowerShell mangles embedded double quotes in single-quoted arguments like 'version = "0.0.0"', causing the search string to never match. The replacement silently fails, and the binary compiles with version = "0.0.0" still in Cargo.toml.

Verified by temporarily disabling the fix and confirming the CI fails with version = "0.0.0" still present.

Test plan

  • CI passes with shell: bash on the version replacement steps
  • Verified root cause by disabling the fix and confirming CI failure

🤖 Generated with Claude Code

@netlify
Copy link
Copy Markdown

netlify Bot commented Mar 10, 2026

Deploy Preview for viteplus-staging ready!

Name Link
🔨 Latest commit 4bc1550
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-staging/deploys/69b03b159d0f1e00083bed5b
😎 Deploy Preview https://deploy-preview-767--viteplus-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@fengmk2 fengmk2 self-assigned this Mar 10, 2026
Copy link
Copy Markdown
Member Author

fengmk2 commented Mar 10, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@fengmk2 fengmk2 marked this pull request as ready for review March 10, 2026 15:15
fengmk2 added 4 commits March 10, 2026 15:38
Add `defaults: run: shell: bash` to the `build-rust` job in the release
workflow so that version placeholder replacement uses bash instead of
PowerShell on Windows runners, fixing quoting issues with embedded
double quotes. Add a verification step to catch silent replacement
failures early. Also enable the replace-file-content snap test on win32.
@fengmk2 fengmk2 force-pushed the fix-windows-version branch from 9030ad3 to 4bc1550 Compare March 10, 2026 15:38
Copy link
Copy Markdown
Member Author

fengmk2 commented Mar 10, 2026

Merge activity

  • Mar 10, 3:39 PM UTC: Graphite rebased this pull request as part of a merge.
  • Mar 10, 3:51 PM UTC: Graphite couldn't merge this PR because it was not satisfying all requirements (Failed CI: 'done', 'CLI E2E test (windows-latest)').
  • Mar 10, 4:13 PM UTC: @fengmk2 merged this pull request with Graphite.

Copy link
Copy Markdown
Member Author

fengmk2 commented Mar 10, 2026

image.png

it works

@fengmk2 fengmk2 merged commit 9eaeeb9 into main Mar 10, 2026
32 of 34 checks passed
@fengmk2 fengmk2 deleted the fix-windows-version branch March 10, 2026 16:13
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