diff options
Diffstat (limited to 'commands')
-rw-r--r-- | commands/bridge_pull.go | 2 | ||||
-rw-r--r-- | commands/bridge_rm.go | 10 |
2 files changed, 8 insertions, 4 deletions
diff --git a/commands/bridge_pull.go b/commands/bridge_pull.go index f9958882..c7a22d6d 100644 --- a/commands/bridge_pull.go +++ b/commands/bridge_pull.go @@ -23,7 +23,7 @@ func runBridgePull(cmd *cobra.Command, args []string) error { if len(args) == 0 { b, err = bridge.DefaultBridge(backend) } else { - b, err = bridge.NewBridgeFromFullName(backend, args[0]) + b, err = bridge.LoadBridge(backend, args[0]) } if err != nil { diff --git a/commands/bridge_rm.go b/commands/bridge_rm.go index 80a831ff..1c840e8a 100644 --- a/commands/bridge_rm.go +++ b/commands/bridge_rm.go @@ -1,10 +1,13 @@ package commands import ( + "fmt" + + "github.com/spf13/cobra" + "github.com/MichaelMure/git-bug/bridge" "github.com/MichaelMure/git-bug/cache" "github.com/MichaelMure/git-bug/util/interrupt" - "github.com/spf13/cobra" ) func runBridgeRm(cmd *cobra.Command, args []string) error { @@ -15,16 +18,17 @@ func runBridgeRm(cmd *cobra.Command, args []string) error { defer backend.Close() interrupt.RegisterCleaner(backend.Close) - err = bridge.RemoveBridges(backend, args[0]) + err = bridge.RemoveBridge(backend, args[0]) if err != nil { return err } + fmt.Printf("Successfully removed bridge configuration %v", args[0]) return nil } var bridgeRmCmd = &cobra.Command{ - Use: "rm name <name>", + Use: "rm <name>", Short: "Delete a configured bridge.", PreRunE: loadRepo, RunE: runBridgeRm, |