[PR #1568] [CLOSED] Fix PowerShell 5.1 command shown by UPDATE.bat #3538

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

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/1568
Author: @BonifacioCalindoro
Created: 10/8/2026
Status: ❌ Closed

Base: main ← Head: patch-2


📝 Commits (1)

  • ef89155 Fix PowerShell 5.1 command shown by UPDATE.bat

📊 Changes

1 file changed (+2 additions, -1 deletions)

View changed files

📝 UPDATE.bat (+2 -1)

📄 Description

Fix PowerShell 5.1 compatibility of recovery instructions

UPDATE.bat currently prints this command when a clone needs to be moved to the new repository history:

git branch pre-cleanup-backup && git stash push

This is valid in PowerShell 7, but not in Windows PowerShell 5.1. Windows 11 can still launch Windows PowerShell 5.1 by default, so users can encounter a parser error when copying the command from the script:

The token '&&' is not a valid statement separator in this version.

The .bat itself does not need to change its use of &&: the problematic && is inside an echo and is intended to be copied and executed by the user in their shell.

This change prints the two commands separately instead:

git branch pre-cleanup-backup
git stash push

This works in both Windows PowerShell 5.1 and newer PowerShell versions, while also avoiding a shell-specific operator in instructions intended for manual execution.

No behavior of the update script itself is changed.

Fixes #1566


🔄 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/Niko1221/Strata/pull/1568 **Author:** [@BonifacioCalindoro](https://github.com/BonifacioCalindoro) **Created:** 10/8/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `patch-2` --- ### 📝 Commits (1) - [`ef89155`](https://github.com/Niko1221/Strata/commit/ef8915533ad2c8e5c58da369b9a1c3b2d2077234) Fix PowerShell 5.1 command shown by UPDATE.bat ### 📊 Changes **1 file changed** (+2 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `UPDATE.bat` (+2 -1) </details> ### 📄 Description ## Fix PowerShell 5.1 compatibility of recovery instructions `UPDATE.bat` currently prints this command when a clone needs to be moved to the new repository history: ```text git branch pre-cleanup-backup && git stash push ``` This is valid in PowerShell 7, but not in Windows PowerShell 5.1. Windows 11 can still launch Windows PowerShell 5.1 by default, so users can encounter a parser error when copying the command from the script: ```text The token '&&' is not a valid statement separator in this version. ``` The `.bat` itself does not need to change its use of `&&`: the problematic `&&` is inside an `echo` and is intended to be copied and executed by the user in their shell. This change prints the two commands separately instead: ```text git branch pre-cleanup-backup git stash push ``` This works in both Windows PowerShell 5.1 and newer PowerShell versions, while also avoiding a shell-specific operator in instructions intended for manual execution. No behavior of the update script itself is changed. Fixes #1566 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 14:42:11 +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
Niko1221/Strata#3538
No description provided.