mirror of
https://github.com/garrytan/gstack.git
synced 2026-05-07 05:56:41 +02:00
fix: settings-hook remove exits 1 when nothing to remove
gstack-settings-hook remove was exiting 0 when settings.json didn't exist, causing gstack-uninstall to report "SessionStart hook" as removed on clean systems where nothing was installed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -85,11 +85,11 @@ describe('gstack-settings-hook', () => {
|
||||
expect(settings.hooks).toBeUndefined();
|
||||
});
|
||||
|
||||
test('remove is safe when settings.json does not exist', () => {
|
||||
test('remove exits 1 when settings.json does not exist', () => {
|
||||
const result = run(`${SETTINGS_HOOK} remove /path/to/gstack-session-update`, {
|
||||
env: { GSTACK_SETTINGS_FILE: settingsFile },
|
||||
});
|
||||
expect(result.exitCode).toBe(0);
|
||||
expect(result.exitCode).toBe(1);
|
||||
});
|
||||
|
||||
test('remove preserves other hooks', () => {
|
||||
|
||||
Reference in New Issue
Block a user