X Tutup
Skip to content

Commit 0f1aaae

Browse files
committed
issue/pr comment: allow using editor in non-interactive mode
The user should be able to `gh config set prompt disabled` and still be allowed to use `gh issue comment --editor`.
1 parent 57f49d9 commit 0f1aaae

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

pkg/cmd/pr/shared/commentable.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,6 @@ func CommentablePreRun(cmd *cobra.Command, opts *CommentableOptions) error {
6868
return cmdutil.FlagErrorf("flags required when not running interactively")
6969
}
7070
opts.Interactive = true
71-
} else if inputFlags == 1 {
72-
if !opts.IO.CanPrompt() && opts.InputType == InputTypeEditor {
73-
return cmdutil.FlagErrorf("`--body`, `--body-file` or `--web` required when not running interactively")
74-
}
7571
} else if inputFlags > 1 {
7672
return cmdutil.FlagErrorf("specify only one of `--body`, `--body-file`, `--editor`, or `--web`")
7773
}

0 commit comments

Comments
 (0)
X Tutup