Add error details for gh issue view

This commit is contained in:
Corey Johnson 2019-12-10 16:01:42 -08:00
parent 9b40efcad5
commit 748b213c9a

View file

@ -60,8 +60,13 @@ var issueStatusCmd = &cobra.Command{
RunE: issueStatus,
}
var issueViewCmd = &cobra.Command{
Use: "view {<number> | <url> | <branch>}",
Args: cobra.MinimumNArgs(1),
Use: "view {<number> | <url> | <branch>}",
Args: func(cmd *cobra.Command, args []string) error {
if len(args) < 1 {
return errors.New("requires an issue number as an argument")
}
return nil
},
Short: "View an issue in the browser",
RunE: issueView,
}