mirror of
https://github.com/coder/coder.git
synced 2026-09-22 13:10:21 +08:00
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:
+5
-1
@@ -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"))
|
||||
|
||||
Reference in New Issue
Block a user