mirror of
https://github.com/fiatjaf/nak.git
synced 2024-10-30 00:59:07 -04:00
only look for private key in environment variable if --sec is not given.
This commit is contained in:
parent
ec2e214c02
commit
48c0e342e3
|
@ -196,10 +196,13 @@ func gatherSecretKeyOrBunkerFromArguments(ctx context.Context, c *cli.Command) (
|
|||
return "", bunker, err
|
||||
}
|
||||
|
||||
// Check in the Env for the secret key first
|
||||
sec := c.String("sec")
|
||||
if env, ok := os.LookupEnv("NOSTR_PRIVATE_KEY"); ok {
|
||||
sec = env
|
||||
|
||||
// check in the environment for the secret key
|
||||
if sec == "" {
|
||||
if key, ok := os.LookupEnv("NOSTR_PRIVATE_KEY"); ok {
|
||||
sec = key
|
||||
}
|
||||
}
|
||||
|
||||
if c.Bool("prompt-sec") {
|
||||
|
|
Loading…
Reference in New Issue
Block a user