aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--commands/comment_add.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/commands/comment_add.go b/commands/comment_add.go
index d720a09b..5a7cd6a8 100644
--- a/commands/comment_add.go
+++ b/commands/comment_add.go
@@ -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