Skip to content

Commit a3890c4

Browse files
committed
bunker: don't conflict with stored if only default --sec exists, not explicit.
fixes nostr:nevent1qvzqqqqqqypzprqgrf7tvq6w3gzkmltk6n4s7hxa6xzc0dgn7mrgr77cjs87svqzqyd8wumn8ghj7cnpwdehq6tnw3hkctn0wfnj76twvfhhsqglwaehxw309ac8junpd45kgtnxd9shg6npvchxxmmd9a5kucn00qqzq570y8j7wet7fw6qz39z3kchqdxxw6wp7anxnxpy62x0qhqd6fhlz79p53
1 parent 1403c7d commit a3890c4

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

bunker.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,10 @@ var bunker = &cli.Command{
154154
}
155155

156156
if config.Secret.Plain == nil && config.Secret.Encrypted == nil {
157-
// we don't have any secret key stored, so just use whatever was given via flags
157+
// we don't have any secret key stored, so just use whatever was given via flags (or defaults)
158158
config.Secret = baseSecret
159-
} else if baseSecret.Plain == nil && baseSecret.Encrypted == nil {
160-
// we didn't provide any keys, so we just use the stored
159+
} else if !c.IsSet("sec") && !c.IsSet("prompt-sec") {
160+
// we didn't provide any keys explicitly, so we just use the stored
161161
} else {
162162
// we have a secret key stored
163163
// if we also provided a key we check if they match and fail otherwise

0 commit comments

Comments
 (0)