We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 616d929 commit 69855b7Copy full SHA for 69855b7
1 file changed
pkg/cmd/discussion/comment/comment.go
@@ -95,7 +95,7 @@ func NewCmdComment(f *cmdutil.Factory, runF func(*CommentOptions) error) *cobra.
95
return cmdutil.FlagErrorf("--yes is required when not running interactively with --delete")
96
}
97
if !opts.IO.CanPrompt() && !opts.Delete {
98
- if !cmd.Flags().Changed("body") && !cmd.Flags().Changed("body-file") {
+ if opts.Body == "" && opts.BodyFile == "" {
99
return cmdutil.FlagErrorf("--body or --body-file is required when not running interactively")
100
101
0 commit comments