diff --git a/command/issue.go b/command/issue.go index 4bc57e926..67fc592b9 100644 --- a/command/issue.go +++ b/command/issue.go @@ -383,7 +383,7 @@ func issueCreate(cmd *cobra.Command, args []string) error { action := SubmitAction - interactive := !cmd.Flags().Changed("title") || !cmd.Flags().Changed("body") + interactive := !cmd.Flags().Changed("title") && !cmd.Flags().Changed("body") if interactive { tb, err := titleBodySurvey(cmd, title, body, defaults{}, templateFiles) @@ -405,6 +405,10 @@ func issueCreate(cmd *cobra.Command, args []string) error { if body == "" { body = tb.Body } + } else { + if title == "" { + return fmt.Errorf("title can't be blank") + } } if action == PreviewAction {