Skip to content

Commit

Permalink
register: fix force flag (#5)
Browse files Browse the repository at this point in the history
Signed-off-by: Sumner Evans <[email protected]>
  • Loading branch information
sumnerevans authored Aug 2, 2023
1 parent 91ccf7f commit 834544e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/bbctl/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func doRegisterBridge(ctx *cli.Context, bridge, bridgeType string, onlyGet bool)
}
SaveHungryURL(ctx, whoami.UserInfo.HungryURL)
bridgeInfo, ok := whoami.User.Bridges[bridge]
if ok && !bridgeInfo.BridgeState.IsSelfHosted {
if ok && !bridgeInfo.BridgeState.IsSelfHosted && !ctx.Bool("force") {
return nil, UserError{fmt.Sprintf("Your %s bridge is not self-hosted.", color.CyanString(bridge))}
}
if ok && !onlyGet && ctx.Command.Name == "register" {
Expand Down

0 comments on commit 834544e

Please sign in to comment.