aboutsummaryrefslogtreecommitdiffstats
path: root/commands/bridge_token_rm.go
diff options
context:
space:
mode:
Diffstat (limited to 'commands/bridge_token_rm.go')
-rw-r--r--commands/bridge_token_rm.go15
1 files changed, 14 insertions, 1 deletions
diff --git a/commands/bridge_token_rm.go b/commands/bridge_token_rm.go
index 7296f95a..1f4ca4e8 100644
--- a/commands/bridge_token_rm.go
+++ b/commands/bridge_token_rm.go
@@ -1,13 +1,26 @@
package commands
import (
+ "fmt"
+
"github.com/spf13/cobra"
"github.com/MichaelMure/git-bug/bridge/core"
)
func runBridgeTokenRm(cmd *cobra.Command, args []string) error {
- return core.RemoveToken(repo, args[0])
+ token, err := core.LoadTokenPrefix(repo, args[0])
+ if err != nil {
+ return err
+ }
+
+ err = core.RemoveToken(repo, token.ID())
+ if err != nil {
+ return err
+ }
+
+ fmt.Printf("token %s removed\n", token.ID())
+ return nil
}
var bridgeTokenRmCmd = &cobra.Command{