fix(felhom-wipe): nuclear wipe stops early due to set -e + missing state files
[ -f "$f" ] && rm -f "$f" && info "..." returns exit code 1 when the file doesn't exist, triggering set -euo pipefail. Nuclear wipe was silently stopping after settings.json and metrics.db (the only two state files present), never reaching the controller/full/nuclear steps. Fix: if [ -f "$f" ]; then rm -f "$f" && info "..."; fi Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -346,7 +346,7 @@ do_soft_wipe() {
|
||||
info "Soft wipe: removing controller state..."
|
||||
local state_files=("$DATA_DIR/settings.json" "$DATA_DIR/metrics.db" "$DATA_DIR/setup-state.json" "$DATA_DIR/update-state.json" "$DATA_DIR/session-data.json" "$DATA_DIR/snapshot-history.json")
|
||||
for f in "${state_files[@]}"; do
|
||||
[ -f "$f" ] && rm -f "$f" && info " Removed: $f"
|
||||
if [ -f "$f" ]; then rm -f "$f" && info " Removed: $f"; fi
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user