From a3890c49768a01ff6af9c0ae61fcb5d32c65ac1a Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Wed, 22 Jul 2026 08:31:15 -0300 Subject: [PATCH] bunker: don't conflict with stored if only default --sec exists, not explicit. fixes nostr:nevent1qvzqqqqqqypzprqgrf7tvq6w3gzkmltk6n4s7hxa6xzc0dgn7mrgr77cjs87svqzqyd8wumn8ghj7cnpwdehq6tnw3hkctn0wfnj76twvfhhsqglwaehxw309ac8junpd45kgtnxd9shg6npvchxxmmd9a5kucn00qqzq570y8j7wet7fw6qz39z3kchqdxxw6wp7anxnxpy62x0qhqd6fhlz79p53 --- bunker.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bunker.go b/bunker.go index d791452..96f1a19 100644 --- a/bunker.go +++ b/bunker.go @@ -154,10 +154,10 @@ var bunker = &cli.Command{ } if config.Secret.Plain == nil && config.Secret.Encrypted == nil { - // we don't have any secret key stored, so just use whatever was given via flags + // we don't have any secret key stored, so just use whatever was given via flags (or defaults) config.Secret = baseSecret - } else if baseSecret.Plain == nil && baseSecret.Encrypted == nil { - // we didn't provide any keys, so we just use the stored + } else if !c.IsSet("sec") && !c.IsSet("prompt-sec") { + // we didn't provide any keys explicitly, so we just use the stored } else { // we have a secret key stored // if we also provided a key we check if they match and fail otherwise