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/label.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'commands/label.go') diff --git a/commands/label.go b/commands/label.go index fd958d68..0221701c 100644 --- a/commands/label.go +++ b/commands/label.go @@ -30,9 +30,10 @@ func runLabel(cmd *cobra.Command, args []string) error { } var labelCmd = &cobra.Command{ - Use: "label []", - Short: "Display, add or remove labels", - RunE: runLabel, + Use: "label []", + Short: "Display, add or remove labels", + PreRunE: loadRepo, + RunE: runLabel, } func init() { -- cgit