Use RunE instead of panicking
This commit is contained in:
parent
2dc521d589
commit
994e9eee10
1 changed files with 2 additions and 5 deletions
|
|
@ -26,11 +26,8 @@ work with pull requests.`,
|
|||
var prListCmd = &cobra.Command{
|
||||
Use: "list",
|
||||
Short: "List pull requests",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
err := ExecutePr()
|
||||
if err != nil {
|
||||
panic(err) // In the future this should handle the error better, but for now panic seems like a valid reaction
|
||||
}
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
return ExecutePr()
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue