Skip to content

Commit

Permalink
Remove --web on branch create
Browse files Browse the repository at this point in the history
This flag is unused, removing it to simplify.
  • Loading branch information
mscoutermarsh committed Dec 12, 2023
1 parent 41e51f3 commit 50509be
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions internal/cmd/branch/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ import (
"context"
"errors"
"fmt"
"net/url"
"time"

"github.com/pkg/browser"
"github.com/planetscale/cli/internal/cmdutil"
"github.com/planetscale/cli/internal/printer"
ps "github.com/planetscale/planetscale-go/planetscale"
Expand Down Expand Up @@ -76,23 +74,6 @@ func CreateCmd(ch *cmdutil.Helper) *cobra.Command {
createReq.Name = branch
createReq.Organization = ch.Config.Organization

web, err := cmd.Flags().GetBool("web")
if err != nil {
return err
}

if web {
ch.Printer.Println("🌐 Redirecting you to branch a database in your web browser.")
err := browser.OpenURL(fmt.Sprintf(
"%s/%s/%s/branches?name=%s&region=%s&showDialog=true",
cmdutil.ApplicationURL, ch.Config.Organization, source, url.QueryEscape(createReq.Name), url.QueryEscape(createReq.Region),
))
if err != nil {
return err
}
return nil
}

client, err := ch.Client()
if err != nil {
return err
Expand Down Expand Up @@ -165,7 +146,6 @@ func CreateCmd(ch *cmdutil.Helper) *cobra.Command {

return regionStrs, cobra.ShellCompDirectiveDefault
})
cmd.Flags().BoolP("web", "w", false, "Create a branch in your web browser")

return cmd
}
Expand Down

0 comments on commit 50509be

Please sign in to comment.