aboutsummaryrefslogtreecommitdiffstats
path: root/commands/bridge/bridge.go
diff options
context:
space:
mode:
Diffstat (limited to 'commands/bridge/bridge.go')
-rw-r--r--commands/bridge/bridge.go14
1 files changed, 6 insertions, 8 deletions
diff --git a/commands/bridge/bridge.go b/commands/bridge/bridge.go
index 980a38e2..9f7c5e50 100644
--- a/commands/bridge/bridge.go
+++ b/commands/bridge/bridge.go
@@ -7,9 +7,7 @@ import (
"github.com/MichaelMure/git-bug/commands/execenv"
)
-func NewBridgeCommand() *cobra.Command {
- env := execenv.NewEnv()
-
+func NewBridgeCommand(env *execenv.Env) *cobra.Command {
cmd := &cobra.Command{
Use: "bridge",
Short: "List bridges to other bug trackers",
@@ -20,11 +18,11 @@ func NewBridgeCommand() *cobra.Command {
Args: cobra.NoArgs,
}
- cmd.AddCommand(newBridgeAuthCommand())
- cmd.AddCommand(newBridgeNewCommand())
- cmd.AddCommand(newBridgePullCommand())
- cmd.AddCommand(newBridgePushCommand())
- cmd.AddCommand(newBridgeRm())
+ cmd.AddCommand(newBridgeAuthCommand(env))
+ cmd.AddCommand(newBridgeNewCommand(env))
+ cmd.AddCommand(newBridgePullCommand(env))
+ cmd.AddCommand(newBridgePushCommand(env))
+ cmd.AddCommand(newBridgeRm(env))
return cmd
}