fix(setup): always delete plaintext vault.yml, even after staging traps #32
Loading…
Reference in a new issue
No description provided.
Delete branch "jfraeys/fix/setup-plaintext-vault-cleanup"
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?
Plaintext secrets/vault.yml was left on disk after every staging run: setup set its cleanup as an EXIT trap, but staging.sh replaces the EXIT trap (and clear_staging_trap removes it). Found when scripts/with-vault.sh refused to run on the leftover (verified identical to the SOPS vault, then deleted).
Fix: common_vault_remove_plaintext, called from cleanup(), both staging EXIT handlers, and restored via
trap cleanup EXITin clear_staging_trap. Tested the function under a plain EXIT trap, a replaced one, and a cleared-then-restored one; it never touches vault.yml in a non-SOPS repo.Not run end to end (a full staging run provisions VMs).
🤖 Generated with Claude Code