mirror of
https://github.com/aaif-goose/goose.git
synced 2026-07-03 14:10:03 +02:00
fix(goose2): add confirm parameter to wipe recipe for non-interactive use
Add a `confirm` parameter (default "no") to the `just goose2 wipe` recipe. When invoked with `confirm=yes`, the interactive prompt is skipped, allowing scripted/piped usage without hanging on stdin. Interactive: just goose2 wipe Scripted: just goose2 wipe confirm=yes Signed-off-by: Matt Toohey <contact@matttoohey.com>
This commit is contained in:
+5
-3
@@ -273,7 +273,7 @@ kill-all:
|
||||
# ── Utilities ────────────────────────────────────────────────
|
||||
|
||||
# Delete goose2 dev session data and webview storage so the next launch shows onboarding
|
||||
wipe:
|
||||
wipe confirm="no":
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
@@ -286,8 +286,10 @@ wipe:
|
||||
echo ""
|
||||
echo "Preserved: config.yaml, secrets, keyring, legacy .jsonl sessions, scheduler, prod data, app state"
|
||||
echo ""
|
||||
read -p "Continue? [y/N] " confirm
|
||||
[[ "$confirm" =~ ^[Yy]$ ]] || exit 0
|
||||
if [[ "{{ confirm }}" != "yes" ]]; then
|
||||
read -p "Continue? [y/N] " answer
|
||||
[[ "$answer" =~ ^[Yy]$ ]] || exit 0
|
||||
fi
|
||||
|
||||
# Sessions DB (preserve .jsonl files for re-migration)
|
||||
rm -f "$DATA_DIR/sessions/sessions.db" \
|
||||
|
||||
Reference in New Issue
Block a user