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/bridge_rm.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'commands/bridge_rm.go') diff --git a/commands/bridge_rm.go b/commands/bridge_rm.go index acde9da5..2ebc17a7 100644 --- a/commands/bridge_rm.go +++ b/commands/bridge_rm.go @@ -22,10 +22,11 @@ func runBridgeRm(cmd *cobra.Command, args []string) error { } var bridgeRmCmd = &cobra.Command{ - Use: "rm name ", - Short: "Delete a configured bridge", - RunE: runBridgeRm, - Args: cobra.ExactArgs(1), + Use: "rm name ", + Short: "Delete a configured bridge", + PreRunE: loadRepo, + RunE: runBridgeRm, + Args: cobra.ExactArgs(1), } func init() { -- cgit