fix: allow server startup without tunnel (#2380)

- 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.
This commit is contained in:
Jon Ayers
2022-06-15 12:54:01 -05:00
committed by GitHub
parent 9b3b6418a2
commit 6cf483bf37
+5 -1
View File
@@ -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"))