mirror of
https://github.com/SillyTavern/SillyTavern-Launcher.git
synced 2026-11-05 00:27:39 +00:00
[PR #135] [MERGED] Fix path regex compatibility with Bash 5.3 #127
Labels
No labels
🚏 Awaiting User Response
🐛Bug
🐛Bug
🐛Bug
🦄 Feature Request
✅ Fixed
✅ Fixed
👩💻 Good First Issue
‼️ High Priority
🧑💻 In Progress
🐧 Linux
🐧 Linux
💤 Low Priority
🍎 Mac
❕ Medium Priority
pull-request
🪟 Windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
SillyTavern/SillyTavern-Launcher#127
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/SillyTavern/SillyTavern-Launcher/pull/135
Author: @jochst
Created: 8/3/2026
Status: ✅ Merged
Merged: 8/4/2026
Merged by: @deffcolony
Base:
main← Head:fix/bash-5-3-path-regex📝 Commits (1)
5315f31Fix path regex compatibility with Bash 5.3📊 Changes
1 file changed (+2 additions, -1 deletions)
View changed files
📝
launcher.sh(+2 -1)📄 Description
Summary
invalid regular expressionfailure on GNU Bash 5.3.Root cause
launcher.shused this expression incheck_path_special_chars:On GNU Bash 5.3.9, the regex backend rejects the escaped braces inside the bracket expression with:
bash -n launcher.shdoes not report the problem because-nvalidates shell syntax without executing commands. The right-hand side of[[ string =~ regex ]]is compiled by Bash's regex engine only when that conditional executes, so the script can pass the syntax check and still fail at startup.The error appeared in a Zsh terminal, but Zsh was not parsing this expression during normal
./launcher.shexecution. The script has a#!/bin/bashshebang, so Zsh launched Bash as the child interpreter and displayed Bash's runtime diagnostic on the terminal. Sourcing the launcher into Zsh would be a separate, unsupported execution mode.Fix
Store a standards-compliant bracket expression in a single-quoted variable and pass that variable to
=~:Placing
]first makes it literal inside the bracket expression. The braces are already literal inside the class and must not be escaped. Keeping the regex in a single-quoted variable also avoids shell-parser ambiguity around the punctuation.Verification
No canonical launcher test suite was detected, so I ran focused behavioral verification against the function extracted from the modified
launcher.sh:bash -n launcher.shgit diff --checkTest environment: GNU Bash 5.3.9.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.