Disable interactive only if both flags are passed

Co-authored-by: Mislav Marohnić <mislav@github.com>
This commit is contained in:
Nikola Ristic 2020-05-05 16:34:31 +02:00 committed by GitHub
parent 76c73db5a0
commit 1f9b7c0fe0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)