From 2429e793bdf1a408cbdc7153c87d38b5a12b1fda Mon Sep 17 00:00:00 2001 From: Matt Toohey Date: Thu, 7 May 2026 15:46:19 +1000 Subject: [PATCH] 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 --- ui/goose2/justfile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ui/goose2/justfile b/ui/goose2/justfile index 982946da0f..9fe3dcba00 100644 --- a/ui/goose2/justfile +++ b/ui/goose2/justfile @@ -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" \