[PR #967] [MERGED] Fix Windows installer shallow release checkout #4861

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/967
Author: @Xelvanis
Created: 5/18/2026
Status: ✅ Merged
Merged: 5/18/2026
Merged by: @Xelvanis

Base: staging ← Head: fix/windows-installer-shallow-tag-checkout


📝 Commits (1)

  • 1b97551 fix: harden Windows installer release checkout

📊 Changes

3 files changed (+43 additions, -2 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 win/installer/install.bat (+16 -1)
📝 win/installer/installer.nsi (+26 -1)

📄 Description

Linked issue

No linked issue yet. This came from a Discord/user support report of the Windows installer failing while updating an existing install to v1.6.0.

Why this change

Users with installer-created shallow release checkouts can hit a confusing Git failure while updating when the fetched release tag resolves to a commit that is not available in the local object database yet. In that state, checkout can fail before the installer reaches dependency install/build, leaving users stuck even though their data folder is untouched.

What changed

  • Verifies the resolved release commit exists locally before checkout in the NSIS installer and batch installer.
  • Fetches origin/main, then the exact resolved commit as a fallback, when the target commit is missing from a shallow checkout.
  • Uses plain git checkout <commit> after commit verification so the installer still lands in detached HEAD without relying on the --detach <commit> syntax.
  • Adds an Unreleased changelog note for the Windows installer update fix.

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

Manual verification notes

  • Ran pnpm check.
  • Ran pnpm version:check.
  • Ran pnpm guard:installer-artifacts.
  • Ran node scripts/check-windows-installer-layout.mjs.
  • Smoke-tested a disposable shallow v1.5.9 clone by fetching v1.6.0, resolving c247b2ebd6f2b6274cb7284e37d6ad382aafa6ac, verifying it with git cat-file, and checking it out with the patched command.
  • Smoke-tested the fallback path where c247b2ebd6f2b6274cb7284e37d6ad382aafa6ac is missing before fetching origin/main, then verified checkout lands on the expected commit in detached HEAD.
  • Did not compile the NSIS installer executable locally because makensis is not installed in this environment.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Version/release files updated (only if this PR includes a version bump)

UI evidence (if applicable)

Not applicable; installer/update script change only.

Summary by CodeRabbit

Bug Fixes

  • Fixed Windows installer to properly update existing shallow release checkouts. The installer now validates the target release commit exists locally before checkout, automatically fetching it if needed to ensure smooth and reliable updates.

Review Change Stack


🔄 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/967 **Author:** [@Xelvanis](https://github.com/Xelvanis) **Created:** 5/18/2026 **Status:** ✅ Merged **Merged:** 5/18/2026 **Merged by:** [@Xelvanis](https://github.com/Xelvanis) **Base:** `staging` ← **Head:** `fix/windows-installer-shallow-tag-checkout` --- ### 📝 Commits (1) - [`1b97551`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1b9755105f0ee857223709c7ae26f85aad4e4fa8) fix: harden Windows installer release checkout ### 📊 Changes **3 files changed** (+43 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `win/installer/install.bat` (+16 -1) 📝 `win/installer/installer.nsi` (+26 -1) </details> ### 📄 Description ## Linked issue No linked issue yet. This came from a Discord/user support report of the Windows installer failing while updating an existing install to `v1.6.0`. ## Why this change Users with installer-created shallow release checkouts can hit a confusing Git failure while updating when the fetched release tag resolves to a commit that is not available in the local object database yet. In that state, checkout can fail before the installer reaches dependency install/build, leaving users stuck even though their data folder is untouched. ## What changed - Verifies the resolved release commit exists locally before checkout in the NSIS installer and batch installer. - Fetches `origin/main`, then the exact resolved commit as a fallback, when the target commit is missing from a shallow checkout. - Uses plain `git checkout <commit>` after commit verification so the installer still lands in detached HEAD without relying on the `--detach <commit>` syntax. - Adds an Unreleased changelog note for the Windows installer update fix. ## Validation - [x] `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) - [x] Above manual verification completed (describe below) - [x] Read and followed `CONTRIBUTING.md` ### Manual verification notes - Ran `pnpm check`. - Ran `pnpm version:check`. - Ran `pnpm guard:installer-artifacts`. - Ran `node scripts/check-windows-installer-layout.mjs`. - Smoke-tested a disposable shallow `v1.5.9` clone by fetching `v1.6.0`, resolving `c247b2ebd6f2b6274cb7284e37d6ad382aafa6ac`, verifying it with `git cat-file`, and checking it out with the patched command. - Smoke-tested the fallback path where `c247b2ebd6f2b6274cb7284e37d6ad382aafa6ac` is missing before fetching `origin/main`, then verified checkout lands on the expected commit in detached HEAD. - Did not compile the NSIS installer executable locally because `makensis` is not installed in this environment. ## Docs and release impact - [ ] No docs changes needed - [x] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) Not applicable; installer/update script change only. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Bug Fixes * Fixed Windows installer to properly update existing shallow release checkouts. The installer now validates the target release commit exists locally before checkout, automatically fetching it if needed to ensure smooth and reliable updates. <!-- review_stack_entry_start --> [![Review Change Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/Pasta-Devs/Marinara-Engine/pull/967?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) <!-- review_stack_entry_end --> <!-- 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-22 04:11:15 +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#4861
No description provided.