mirror of
https://github.com/fiatjaf/nak.git
synced 2024-10-30 00:59:07 -04:00
don't fail encode when reading from stdin because of the number of arguments.
This commit is contained in:
parent
ffa41046fd
commit
50dde2117c
|
@ -20,8 +20,8 @@ var encode = &cli.Command{
|
||||||
nak encode nevent --author <pubkey-hex> --relay <relay-url> --relay <other-relay> <event-id>
|
nak encode nevent --author <pubkey-hex> --relay <relay-url> --relay <other-relay> <event-id>
|
||||||
nak encode nsec <privkey-hex>`,
|
nak encode nsec <privkey-hex>`,
|
||||||
Before: func(c *cli.Context) error {
|
Before: func(c *cli.Context) error {
|
||||||
if c.Args().Len() < 2 {
|
if c.Args().Len() < 1 {
|
||||||
return fmt.Errorf("expected more than 2 arguments.")
|
return fmt.Errorf("expected more than 1 argument.")
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue
Block a user