[PR #4877] [MERGED] fix: accept valid pnpm output in Windows installer #6525

Closed
opened 2026-10-23 04:11:14 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/4877
Author: @SpicyMarinara
Created: 8/10/2026
Status: ✅ Merged
Merged: 8/10/2026
Merged by: @SpicyMarinara

Base: staging ← Head: agent/fix-windows-pnpm-version-check


📝 Commits (3)

  • b5ed348 chore: start Windows pnpm installer fix
  • 86fd7cb fix Windows pnpm version validation
  • a2a66e1 harden pnpm installer regression guard

📊 Changes

3 files changed (+50 additions, -13 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 scripts/check-windows-installer-layout.mjs (+20 -1)
📝 win/installer/installer.nsi (+29 -12)

📄 Description

Important

Contributions target staging. Only SpicyMarinara may promote this repository’s staging branch or a same-repository hotfix/* branch to main.

Linked issue

Closes #4875

Why this change

The Windows NSIS installer piped pnpm --version through findstr /X. On affected Windows systems pnpm emits an LF-only line ending, causing findstr to return failure even though the exact required pnpm version is available. This left every pnpm runner and the npm fallback falsely rejected.

What changed

  • Capture each pnpm runner’s version output directly, trim CR/LF, and compare it exactly with the pinned version.
  • Preserve the Corepack → installed pnpm → npx → npm fallback order and command-exit checks.
  • Guard all four NSIS checks against reintroducing line-ending-sensitive findstr validation.
  • Document the user-facing installer fix in the changelog.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Automated/local checks run:

  • pnpm check
  • node scripts/check-windows-installer-layout.mjs
  • pnpm version:check
  • pnpm guard:installer-artifacts
  • pnpm exec prettier --check scripts/check-windows-installer-layout.mjs
  • makensis -V3 installer.nsi
  • git diff --check

Manual verification notes

  • Windows installer execution remains to be manually verified on an affected Windows host. The NSIS source compiles successfully on macOS with MakeNSIS 3.11.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] follow-up issue opened
  • Version/release files updated (only if this PR includes a version bump)

No user guide changes are needed; the existing pnpm troubleshooting commands remain correct. CHANGELOG.md records the fix.

UI evidence (if applicable)

Not applicable.

Summary by CodeRabbit

  • Bug Fixes

    • Improved the Windows installer’s pnpm version detection for environments that return LF-only command output.
    • Added exact version validation across supported pnpm installation methods.
    • Preserved safeguards that reject failed commands and version mismatches.
    • Improved npm fallback command handling for more reliable installations.
  • Documentation

    • Added an Unreleased changelog entry describing the Windows installer fix.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/4877 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 8/10/2026 **Status:** ✅ Merged **Merged:** 8/10/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `agent/fix-windows-pnpm-version-check` --- ### 📝 Commits (3) - [`b5ed348`](https://github.com/Pasta-Devs/Marinara-Engine/commit/b5ed3481115f6fd12013b44b4f28e210c4728d5e) chore: start Windows pnpm installer fix - [`86fd7cb`](https://github.com/Pasta-Devs/Marinara-Engine/commit/86fd7cb51a62dcdcc67b92984a4c98528369009e) fix Windows pnpm version validation - [`a2a66e1`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a2a66e19d1767f1b6a899923aaf75108f18a177d) harden pnpm installer regression guard ### 📊 Changes **3 files changed** (+50 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `scripts/check-windows-installer-layout.mjs` (+20 -1) 📝 `win/installer/installer.nsi` (+29 -12) </details> ### 📄 Description > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository’s `staging` branch or a same-repository `hotfix/*` branch to `main`. ## Linked issue Closes #4875 ## Why this change The Windows NSIS installer piped `pnpm --version` through `findstr /X`. On affected Windows systems pnpm emits an LF-only line ending, causing `findstr` to return failure even though the exact required pnpm version is available. This left every pnpm runner and the npm fallback falsely rejected. ## What changed - Capture each pnpm runner’s version output directly, trim CR/LF, and compare it exactly with the pinned version. - Preserve the Corepack → installed pnpm → npx → npm fallback order and command-exit checks. - Guard all four NSIS checks against reintroducing line-ending-sensitive `findstr` validation. - Document the user-facing installer fix in the changelog. ## Validation - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` Automated/local checks run: - `pnpm check` - `node scripts/check-windows-installer-layout.mjs` - `pnpm version:check` - `pnpm guard:installer-artifacts` - `pnpm exec prettier --check scripts/check-windows-installer-layout.mjs` - `makensis -V3 installer.nsi` - `git diff --check` ### Manual verification notes - Windows installer execution remains to be manually verified on an affected Windows host. The NSIS source compiles successfully on macOS with MakeNSIS 3.11. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n]` follow-up issue opened - [ ] Version/release files updated (only if this PR includes a version bump) No user guide changes are needed; the existing pnpm troubleshooting commands remain correct. `CHANGELOG.md` records the fix. ## UI evidence (if applicable) Not applicable. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved the Windows installer’s pnpm version detection for environments that return LF-only command output. * Added exact version validation across supported pnpm installation methods. * Preserved safeguards that reject failed commands and version mismatches. * Improved npm fallback command handling for more reliable installations. * **Documentation** * Added an Unreleased changelog entry describing the Windows installer fix. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:11:14 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#6525
No description provided.