From a2e888385217d8264958df8c85072ae5e50195c9 Mon Sep 17 00:00:00 2001 From: Michael Quigley Date: Mon, 30 Oct 2023 13:02:30 -0400 Subject: [PATCH] 'zrok reserve' fix for 'drive' backend (#218) --- cmd/zrok/reserve.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cmd/zrok/reserve.go b/cmd/zrok/reserve.go index b6be848d..4b029f11 100644 --- a/cmd/zrok/reserve.go +++ b/cmd/zrok/reserve.go @@ -34,7 +34,7 @@ func newReserveCommand() *reserveCommand { } command := &reserveCommand{cmd: cmd} cmd.Flags().StringArrayVar(&command.frontendSelection, "frontends", []string{"public"}, "Selected frontends to use for the share") - cmd.Flags().StringVarP(&command.backendMode, "backend-mode", "b", "proxy", "The backend mode {proxy, web, , caddy}") + cmd.Flags().StringVarP(&command.backendMode, "backend-mode", "b", "proxy", "The backend mode {proxy, web, , caddy, drive}") cmd.Flags().BoolVarP(&command.jsonOutput, "json-output", "j", false, "Emit JSON describing the created reserved share") cmd.Flags().StringArrayVar(&command.basicAuth, "basic-auth", []string{}, "Basic authentication users (,...)") cmd.Flags().StringVar(&command.oauthProvider, "oauth-provider", "", "Enable OAuth provider [google, github]") @@ -73,8 +73,11 @@ func (cmd *reserveCommand) run(_ *cobra.Command, args []string) { case "caddy": target = args[1] + case "drive": + target = args[1] + default: - tui.Error(fmt.Sprintf("invalid backend mode '%v'; expected {proxy, web, tcpTunnel, udpTunnel, caddy}", cmd.backendMode), nil) + tui.Error(fmt.Sprintf("invalid backend mode '%v'; expected {proxy, web, tcpTunnel, udpTunnel, caddy, drive}", cmd.backendMode), nil) } env, err := environment.LoadRoot()