mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #3998] [MERGED] Fix Windows launcher ERR_INVALID_URL_SCHEME in run-directly guards #6191
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#6191
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/3998
Author: @SpicyMarinara
Created: 7/23/2026
Status: ✅ Merged
Merged: 7/23/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/3997-launcher-windows-entry-guard📝 Commits (1)
ed4b7eaFix Windows launcher crash in run-directly guards📊 Changes
4 files changed (+39 additions, -4 deletions)
View changed files
📝
CHANGELOG.md(+1 -0)📝
scripts/protect-launcher-data.mjs(+4 -2)📝
scripts/read-launcher-env.mjs(+4 -2)📝
scripts/regressions/launcher-update.regression.mjs(+30 -0)📄 Description
Linked issue
Fixes #3997
Why this change
On Windows, restarting Marinara from a fresh staging checkout crashed the launcher's update-snapshot step with
ERR_INVALID_URL_SCHEMEfromprotect-launcher-data.mjs:161, and the launcher then skipped auto-update to protect user data. The run-directly guard built its comparison URL withnew URL(process.argv[1], "file:")— a Windows path likeD:\Users\...has its drive prefix parsed as the URL scheme, so thefile:base is ignored andfileURLToPaththrows on the resultingd:URL at module load.read-launcher-env.mjscarried the same latent pattern.What changed
import.meta.url === pathToFileURL(process.argv[1]).href—pathToFileURLis the drive-letter-safe conversion.pathToFileURLguard shape in both scripts, fails if thenew URL(process.argv...)pattern is reintroduced, and executesprotect-launcher-data.mjsdirectly to prove the guard reachesmain()without a URL-scheme crash.This is the fix alone; no behavior changes beyond the guard evaluation.
Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
ERR_INVALID_URL_SCHEME, and auto-update is no longer skipped.Get-Content .env-driven launcher settings still resolve (read-launcher-env.mjs path) on Windows.pnpm check,regression:issues-adjacent launcher lanes (launcher-env,launcher-update) were run by the preparing agent and passed on macOS; the Windows behavior itself needs the manual check above. The boxes are left for the human contributor per repository policy.Docs and release impact
CHANGELOG.md updated; no version bump.
UI evidence
No UI changes — launcher console output only.
Summary by CodeRabbit
Bug Fixes
Tests
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.