[GH-ISSUE #5645] Manual-update command is unusable in Windows PowerShell (the default Windows shell) #3125

Closed
opened 2026-10-21 05:59:49 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @kolacheee on GitHub (Aug 29, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5645

Originally assigned to: @kolacheee on GitHub.

What happens

When a git install can't apply updates from the browser (UPDATES_APPLY_ENABLED off), the app shows "Update manually with: git fetch … && … || … && corepack pnpm … && …" — one long command chained with && and ||. A Windows tester switching to the staging channel copied it into their terminal and got a wall of red parser errors:

The token '&&' is not a valid statement separator in this version.
You must provide a value expression following the '||' operator.

Nothing ran at all. The default shell on Windows (what opens in Windows Terminal, and what most testers will use) is Windows PowerShell 5.1, which does not support &&/|| between commands — that syntax only works in cmd, Git Bash, or PowerShell 7+. So the manual-update instruction is unusable as-pasted for the majority of Windows testers, exactly the audience the staging channel targets.

This happened to a real beta tester today; the workaround (run it in Git Bash or cmd instead) worked, but nothing in the message tells them that.

A second gap surfaced in the same support exchange: the command assumes the user's terminal is already sitting in the repo checkout, but many users don't know how to cd there — or where their install even lives. The tester needed a separate instruction just to get to D:\Marinara-Engine before the command could be attempted at all.

Try it yourself

On Windows: open Windows PowerShell (5.1, the default "Windows PowerShell" entry, not PowerShell 7), paste any a && b command — parser error. Then in the app with a git install and browser-apply disabled, open Settings → check for updates on the staging channel and note the printed command uses &&/|| throughout.

Where to look

packages/server/src/routes/updates.routes.ts — getManualGitApplyCommand(channel, platform, pnpmCommand) (line ~197) builds the one-liner. It already takes platform (the build step varies for android-termux) but the chaining syntax is POSIX regardless of platform. The message is emitted at line ~989 and also surfaces in the client at SettingsPanel.tsx ~7865.

Suggested direction (either works)

  • On platform === "windows", prefix the hint with where to run it ("Run this in Git Bash or Command Prompt — Windows PowerShell rejects &&"), since both of those accept the existing command unchanged; or
  • Print numbered one-command-per-line steps ("stop if a step fails") instead of a chained one-liner — works in every shell and is easier for testers to read. The && gating matters (a failed checkout must not proceed to install/build), so a PowerShell-safe single line would need explicit if ($LASTEXITCODE -ne 0) { exit } checks — probably more trouble than the two options above.

In both variants, the hint should also detect the install path and lead with the cd command. The server is running from the repo checkout, so it already knows the absolute path (the same repo root the route hands to its git helpers) — print it as the first step, in the right form for the target shell: cd /d "D:\Marinara-Engine" for cmd (the /d matters when the install is on another drive), cd "D:\Marinara-Engine" for Git Bash/POSIX shells. That turns the hint into a complete copy-paste recipe instead of assuming the user knows where their install lives.

Found while helping a beta tester through the staging switch (2026-08-29).

Originally created by @kolacheee on GitHub (Aug 29, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5645 Originally assigned to: @kolacheee on GitHub. **What happens** When a git install can't apply updates from the browser (`UPDATES_APPLY_ENABLED` off), the app shows "Update manually with: `git fetch … && … || … && corepack pnpm … && …`" — one long command chained with `&&` and `||`. A Windows tester switching to the staging channel copied it into their terminal and got a wall of red parser errors: ``` The token '&&' is not a valid statement separator in this version. You must provide a value expression following the '||' operator. ``` Nothing ran at all. The default shell on Windows (what opens in Windows Terminal, and what most testers will use) is Windows PowerShell 5.1, which does not support `&&`/`||` between commands — that syntax only works in cmd, Git Bash, or PowerShell 7+. So the manual-update instruction is unusable as-pasted for the majority of Windows testers, exactly the audience the staging channel targets. This happened to a real beta tester today; the workaround (run it in Git Bash or cmd instead) worked, but nothing in the message tells them that. A second gap surfaced in the same support exchange: the command assumes the user's terminal is already sitting in the repo checkout, but many users don't know how to `cd` there — or where their install even lives. The tester needed a separate instruction just to get to `D:\Marinara-Engine` before the command could be attempted at all. **Try it yourself** On Windows: open Windows PowerShell (5.1, the default "Windows PowerShell" entry, not PowerShell 7), paste any `a && b` command — parser error. Then in the app with a git install and browser-apply disabled, open Settings → check for updates on the staging channel and note the printed command uses `&&`/`||` throughout. **Where to look** `packages/server/src/routes/updates.routes.ts` — `getManualGitApplyCommand(channel, platform, pnpmCommand)` (line ~197) builds the one-liner. It already takes `platform` (the build step varies for android-termux) but the chaining syntax is POSIX regardless of platform. The message is emitted at line ~989 and also surfaces in the client at `SettingsPanel.tsx` ~7865. **Suggested direction (either works)** - On `platform === "windows"`, prefix the hint with where to run it ("Run this in Git Bash or Command Prompt — Windows PowerShell rejects `&&`"), since both of those accept the existing command unchanged; or - Print numbered one-command-per-line steps ("stop if a step fails") instead of a chained one-liner — works in every shell and is easier for testers to read. The `&&` gating matters (a failed checkout must not proceed to install/build), so a PowerShell-safe single line would need explicit `if ($LASTEXITCODE -ne 0) { exit }` checks — probably more trouble than the two options above. In both variants, the hint should also **detect the install path and lead with the `cd` command**. The server is running from the repo checkout, so it already knows the absolute path (the same repo root the route hands to its git helpers) — print it as the first step, in the right form for the target shell: `cd /d "D:\Marinara-Engine"` for cmd (the `/d` matters when the install is on another drive), `cd "D:\Marinara-Engine"` for Git Bash/POSIX shells. That turns the hint into a complete copy-paste recipe instead of assuming the user knows where their install lives. Found while helping a beta tester through the staging switch (2026-08-29).
bsakaguchi 2026-10-21 05:59:49 +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#3125
No description provided.