mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-10 15:09:00 +02:00
fix(setup): register the SessionStart hook with a bash prefix on Windows
Windows can't execute an extensionless bash script directly — registering the bare gstack-session-update path made the hook pop the "Select an app" dialog on every session start (or silently never run), so team-mode auto-upgrade was dead on Windows installs. Companion to the hooks' spawn-bin routing: same defect class at the registration site. Contributed by @NikhileshNanduri (PR #1813; VERSION/CHANGELOG collateral stripped). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
2e25bfdefb
commit
25f101a1a6
@@ -55,6 +55,14 @@ describe('setup: _link_or_copy invariant (D7)', () => {
|
||||
const fnBody = SETUP_SRC.slice(fnStart, fnEnd);
|
||||
expect(fnBody).toContain('_print_windows_copy_note_once');
|
||||
});
|
||||
|
||||
test('SessionStart HOOK_CMD is prefixed with bash on Windows (D7-session-hook)', () => {
|
||||
const hookStart = SETUP_SRC.indexOf('# 10. Team mode: register/unregister SessionStart hook');
|
||||
const hookEnd = SETUP_SRC.indexOf('\nif [ "$TEAM_MODE" -eq 1 ]', hookStart);
|
||||
const hookSection = SETUP_SRC.slice(hookStart, hookEnd);
|
||||
expect(hookSection).toContain('IS_WINDOWS');
|
||||
expect(hookSection).toContain('bash $SOURCE_GSTACK_DIR/bin/gstack-session-update');
|
||||
});
|
||||
});
|
||||
|
||||
// Behavior matrix uses Unix `ln -snf` semantics in the IS_WINDOWS=0 cells.
|
||||
|
||||
Reference in New Issue
Block a user