Skip to content

Commit 267d2d9

Browse files
committed
chore(cli): added error handling to help
Signed-off-by: Fred Myerscough <oniice@gmail.com>
1 parent 1674ed8 commit 267d2d9

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

cmd/list.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package cmd
22

33
import (
4+
"github.com/myerscode/aws-meta/internal/util"
45
"github.com/spf13/cobra"
56
)
67

@@ -17,7 +18,9 @@ Use the available subcommands to list specific types of metadata:
1718
Each subcommand supports optional flags for different output formats.`,
1819
Run: func(cmd *cobra.Command, args []string) {
1920
// Show help when list command is run without subcommands
20-
cmd.Help()
21+
if err := cmd.Help(); err != nil {
22+
util.LogError("Error displaying help: " + err.Error())
23+
}
2124
},
2225
}
2326

0 commit comments

Comments
 (0)