Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion cmd/browser_pools.go
Original file line number Diff line number Diff line change
Expand Up @@ -404,8 +404,9 @@ var browserPoolsListCmd = &cobra.Command{
}

var browserPoolsCreateCmd = &cobra.Command{
Use: "create",
Use: "create [name]",
Short: "Create a new browser pool",
Args: cobra.MaximumNArgs(1),
RunE: runBrowserPoolsCreate,
}

Expand Down Expand Up @@ -518,6 +519,12 @@ func runBrowserPoolsCreate(cmd *cobra.Command, args []string) error {
client := getKernelClient(cmd)

name, _ := cmd.Flags().GetString("name")
if len(args) > 0 && args[0] != "" {
if cmd.Flags().Changed("name") {
return fmt.Errorf("cannot specify pool name as both a positional argument and --name flag")
}
name = args[0]
}
size, _ := cmd.Flags().GetInt64("size")
fillRate, _ := cmd.Flags().GetInt64("fill-rate")
timeout, _ := cmd.Flags().GetInt64("timeout")
Expand Down