Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6cf483b

Browse files
authored
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.
1 parent 9b3b641 commit 6cf483b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cli/server.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,13 @@ func server() *cobra.Command {
192192
Text: "Would you like to start a tunnel for simple setup?",
193193
IsConfirm: true,
194194
})
195-
if errors.Is(err, cliui.Canceled) {
195+
196+
if err != nil && !errors.Is(err, cliui.Canceled) {
196197
return err
197198
}
199+
200+
// Don't tunnel if the user specifies no tunnel.
201+
tunnel = !errors.Is(err, cliui.Canceled)
198202
}
199203
if err == nil {
200204
devTunnel, devTunnelErrChan, err = devtunnel.New(ctxTunnel, logger.Named("devtunnel"))

0 commit comments

Comments
 (0)