fix(vault-fetch): tolerate 'already logged in' at bw config server #68
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "fix/vault-fetch-bw-config-when-logged-in"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Fixes
clawdie-vault-fetchfailing on every repeat run whenbwis already logged in — the exact case the helper exists for (refresh.envfrom the vault on demand).The bug
bw config server "$SERVER"refuses withLogout required before server config updatewhen the Bitwarden CLI is already authenticated. The helper treated that message as fatal (exit 1), so:The fix
The
bw loginblock already tolerates the analogous "already logged in" case by capturing stderr. Mirror that forbw config: capture stderr/stdout and toleratelogout required/already configured/already set, failing only on a real error.Verification (domedog, against live vault)
Reproduced the failure case (logged-in state), then ran the fixed helper:
Full end-to-end chain now proven and repeatable: bootstrap creds → login → unlock → fetch →
.env→ re-lock.Checks
Companion
Findings documented in clawdie-ai
docs/vault-domedog-proof-passed— updatesVAULTWARDEN-DOMEDOG-FINDINGS-2026-06-19.mdto reflect end-to-end PASS (correcting the first draft's misdiagnosis of unlock failure) plus this bug and fix.Co-Authored-By: Hermes & Sam <hello@clawdie.si>