From 7a511f9a13f3d1064fd11c9146e6b21cb961a8b2 Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Wed, 17 Oct 2018 20:38:10 +0200 Subject: commands: don't load the repo for commands that don't need it fix #67 --- commands/comment.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'commands/comment.go') diff --git a/commands/comment.go b/commands/comment.go index c05fd255..fc4b6a6b 100644 --- a/commands/comment.go +++ b/commands/comment.go @@ -43,9 +43,10 @@ func commentsTextOutput(comments []bug.Comment) { } var commentCmd = &cobra.Command{ - Use: "comment []", - Short: "Display or add comments", - RunE: runComment, + Use: "comment []", + Short: "Display or add comments", + PreRunE: loadRepo, + RunE: runComment, } func init() { -- cgit