mirror of
https://github.com/obra/superpowers.git
synced 2026-04-21 08:59:04 +08:00
fix: auto-foreground brainstorm server on Windows/Git Bash
Windows/Git Bash reaps nohup background processes, causing the brainstorm server to die silently after launch. Auto-detect Windows via OSTYPE (msys/cygwin/mingw) and MSYSTEM env vars, switching to foreground mode automatically. Tested on Windows 11 from CMD, PowerShell, and Git Bash — all route through Git Bash and hit the same issue. Based on #740, fixes #737. Also adds CHANGELOG.md documenting the fix and a known OWNER_PID/WINPID mismatch on the main branch. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -64,6 +64,16 @@ if [[ -n "${CODEX_CI:-}" && "$FOREGROUND" != "true" && "$FORCE_BACKGROUND" != "t
|
||||
FOREGROUND="true"
|
||||
fi
|
||||
|
||||
# Windows/Git Bash reaps nohup background processes. Auto-foreground when detected.
|
||||
if [[ "$FOREGROUND" != "true" && "$FORCE_BACKGROUND" != "true" ]]; then
|
||||
case "${OSTYPE:-}" in
|
||||
msys*|cygwin*|mingw*) FOREGROUND="true" ;;
|
||||
esac
|
||||
if [[ -n "${MSYSTEM:-}" ]]; then
|
||||
FOREGROUND="true"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Generate unique session directory
|
||||
SESSION_ID="$$-$(date +%s)"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user