fix: handle _hvault_seed_key rc=2 API error explicitly in vault-seed-chat.sh (#992)
All checks were successful
All checks were successful
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
8381f88491
commit
3b82f8e3a1
1 changed files with 7 additions and 6 deletions
|
|
@ -98,12 +98,13 @@ for key in "${SEED_KEYS[@]}"; do
|
||||||
log "[dry-run] ${key} unchanged"
|
log "[dry-run] ${key} unchanged"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if _hvault_seed_key "$KV_LOGICAL_PATH" "$key"; then
|
rc=0
|
||||||
generated+=("$key")
|
_hvault_seed_key "$KV_LOGICAL_PATH" "$key" || rc=$?
|
||||||
log "${key} generated"
|
case "$rc" in
|
||||||
else
|
0) generated+=("$key"); log "${key} generated" ;;
|
||||||
log "${key} unchanged"
|
1) log "${key} unchanged" ;;
|
||||||
fi
|
*) die "API error seeding ${key} (rc=${rc})" ;;
|
||||||
|
esac
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue