We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ab790ce commit c655bcfCopy full SHA for c655bcf
cmd/keys.go
@@ -47,18 +47,14 @@ func GenerateKeysCmd() *cobra.Command {
47
Use: "generate-key",
48
Short: "Command to generate signer key pair",
49
PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
50
- if accountID == "" {
+ if accountID == "" && outputPath == "" {
51
return bindConfiguration(cmd)
52
}
53
return nil
54
},
55
56
RunE: func(cmd *cobra.Command, args []string) error {
57
- if accountID != "" {
58
- if outputPath == "" {
59
- fmt.Println("Please provide output path using --output flag")
60
- os.Exit(1)
61
- }
+ if outputPath != "" {
62
key := newKey(accountID)
63
dumpJson(outputPath, key)
64
fmt.Printf("key generated: [%s]", outputPath)
0 commit comments