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:
Garry Tan
2026-04-15 00:36:07 -07:00
parent 8a27649467
commit a35ae74475
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -54,7 +54,7 @@ case "$ACTION" in
" 2>/dev/null
;;
remove)
[ -f "$SETTINGS_FILE" ] || exit 0
[ -f "$SETTINGS_FILE" ] || exit 1
GSTACK_SETTINGS_PATH="$SETTINGS_FILE" bun -e "
const fs = require('fs');
const settingsPath = process.env.GSTACK_SETTINGS_PATH;