Skip to content
Snippets Groups Projects
Unverified Commit f67c57c0 authored by Michael Muré's avatar Michael Muré
Browse files

commands: check the bug id before the user write the message for "comment add"

parent b08e28e6
Branches
Tags
No related merge requests found
......@@ -21,6 +21,11 @@ func runCommentAdd(cmd *cobra.Command, args []string) error {
}
defer backend.Close()
b, args, err := _select.ResolveBug(backend, args)
if err != nil {
return err
}
if commentAddMessageFile != "" && commentAddMessage == "" {
commentAddMessage, err = input.FromFile(commentAddMessageFile)
if err != nil {
......@@ -39,11 +44,6 @@ func runCommentAdd(cmd *cobra.Command, args []string) error {
}
}
b, args, err := _select.ResolveBug(backend, args)
if err != nil {
return err
}
err = b.AddComment(commentAddMessage)
if err != nil {
return err
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment