bunker: don't conflict with stored if only default --sec exists, not explicit.

fixes nostr:nevent1qvzqqqqqqypzprqgrf7tvq6w3gzkmltk6n4s7hxa6xzc0dgn7mrgr77cjs87svqzqyd8wumn8ghj7cnpwdehq6tnw3hkctn0wfnj76twvfhhsqglwaehxw309ac8junpd45kgtnxd9shg6npvchxxmmd9a5kucn00qqzq570y8j7wet7fw6qz39z3kchqdxxw6wp7anxnxpy62x0qhqd6fhlz79p53
This commit is contained in:
fiatjaf
2026-07-22 08:31:18 -03:00
parent 1403c7d2cd
commit a3890c4976
+3 -3
View File
@@ -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