From 748b213c9aa038b9029ba264f5a5156a53cb50ea Mon Sep 17 00:00:00 2001 From: Corey Johnson Date: Tue, 10 Dec 2019 16:01:42 -0800 Subject: [PATCH] Add error details for `gh issue view` --- command/issue.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/command/issue.go b/command/issue.go index cc93c6e81..0081e5770 100644 --- a/command/issue.go +++ b/command/issue.go @@ -60,8 +60,13 @@ var issueStatusCmd = &cobra.Command{ RunE: issueStatus, } var issueViewCmd = &cobra.Command{ - Use: "view { | | }", - Args: cobra.MinimumNArgs(1), + Use: "view { | | }", + 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, }