From f64ed71e57f1ea62fddab614f5fb1a5b68be1261 Mon Sep 17 00:00:00 2001 From: sreya Date: Wed, 15 Jun 2022 17:39:44 +0000 Subject: [PATCH] fix: allow server startup without tunnel - Previously, specifying 'no' to the tunnel prompt just killed the process. It should be possible to start the server without a tunnel and not have the process killed. --- cli/server.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cli/server.go b/cli/server.go index b69c6c5c83489..6a68a07a5dfc5 100644 --- a/cli/server.go +++ b/cli/server.go @@ -192,9 +192,13 @@ func server() *cobra.Command { Text: "Would you like to start a tunnel for simple setup?", IsConfirm: true, }) - if errors.Is(err, cliui.Canceled) { + + if err != nil && !errors.Is(err, cliui.Canceled) { return err } + + // Don't tunnel if the user specifies no tunnel. + tunnel = !errors.Is(err, cliui.Canceled) } if err == nil { devTunnel, devTunnelErrChan, err = devtunnel.New(ctxTunnel, logger.Named("devtunnel"))