Skip to content

Commit 994e9ee

Browse files
committed
Use RunE instead of panicking
1 parent 2dc521d commit 994e9ee

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

command/pr.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,8 @@ work with pull requests.`,
2626
var prListCmd = &cobra.Command{
2727
Use: "list",
2828
Short: "List pull requests",
29-
Run: func(cmd *cobra.Command, args []string) {
30-
err := ExecutePr()
31-
if err != nil {
32-
panic(err) // In the future this should handle the error better, but for now panic seems like a valid reaction
33-
}
29+
RunE: func(cmd *cobra.Command, args []string) error {
30+
return ExecutePr()
3431
},
3532
}
3633

0 commit comments

Comments
 (0)