mirror of
https://github.com/fiatjaf/nak.git
synced 2026-10-05 15:18:23 +00:00
bunker: don't conflict with stored if only default --sec exists, not explicit.
fixes nostr:nevent1qvzqqqqqqypzprqgrf7tvq6w3gzkmltk6n4s7hxa6xzc0dgn7mrgr77cjs87svqzqyd8wumn8ghj7cnpwdehq6tnw3hkctn0wfnj76twvfhhsqglwaehxw309ac8junpd45kgtnxd9shg6npvchxxmmd9a5kucn00qqzq570y8j7wet7fw6qz39z3kchqdxxw6wp7anxnxpy62x0qhqd6fhlz79p53
This commit is contained in:
@@ -154,10 +154,10 @@ var bunker = &cli.Command{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if config.Secret.Plain == nil && config.Secret.Encrypted == nil {
|
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
|
config.Secret = baseSecret
|
||||||
} else if baseSecret.Plain == nil && baseSecret.Encrypted == nil {
|
} else if !c.IsSet("sec") && !c.IsSet("prompt-sec") {
|
||||||
// we didn't provide any keys, so we just use the stored
|
// we didn't provide any keys explicitly, so we just use the stored
|
||||||
} else {
|
} else {
|
||||||
// we have a secret key stored
|
// we have a secret key stored
|
||||||
// if we also provided a key we check if they match and fail otherwise
|
// if we also provided a key we check if they match and fail otherwise
|
||||||
|
|||||||
Reference in New Issue
Block a user