mirror of
https://github.com/coder/coder.git
synced 2025-07-13 21:36:50 +00:00
fix: correct minor formatting issues in CLI (#6813)
* fix: remove excess newlines from server startup * Don't log benign closed pipe errors
This commit is contained in:
@ -484,7 +484,7 @@ func (r *RootCmd) Server(newAPI func(context.Context, *coderd.Options) (*coderd.
|
||||
tunnelDone <-chan struct{} = make(chan struct{}, 1)
|
||||
)
|
||||
if cfg.AccessURL.String() == "" {
|
||||
cliui.Infof(inv.Stderr, "Opening tunnel so workspaces can connect to your deployment. For production scenarios, specify an external access URL\n")
|
||||
cliui.Infof(inv.Stderr, "Opening tunnel so workspaces can connect to your deployment. For production scenarios, specify an external access URL")
|
||||
tunnel, err = devtunnel.New(ctx, logger.Named("devtunnel"), cfg.WgtunnelHost.String())
|
||||
if err != nil {
|
||||
return xerrors.Errorf("create tunnel: %w", err)
|
||||
@ -531,7 +531,7 @@ func (r *RootCmd) Server(newAPI func(context.Context, *coderd.Options) (*coderd.
|
||||
}
|
||||
|
||||
// A newline is added before for visibility in terminal output.
|
||||
cliui.Infof(inv.Stdout, "\nView the Web UI: %s\n", cfg.AccessURL.String())
|
||||
cliui.Infof(inv.Stdout, "\nView the Web UI: %s", cfg.AccessURL.String())
|
||||
|
||||
// Used for zero-trust instance identity with Google Cloud.
|
||||
googleTokenValidator, err := idtoken.NewValidator(ctx, option.WithoutAuthentication())
|
||||
|
@ -774,7 +774,11 @@ func (api *API) dialWorkspaceAgentTailnet(agentID uuid.UUID) (*codersdk.Workspac
|
||||
go func() {
|
||||
err := (*api.TailnetCoordinator.Load()).ServeClient(serverConn, uuid.New(), agentID)
|
||||
if err != nil {
|
||||
api.Logger.Warn(ctx, "tailnet coordinator client error", slog.Error(err))
|
||||
// Sometimes, we get benign closed pipe errors when the server is
|
||||
// shutting down.
|
||||
if api.ctx.Err() == nil {
|
||||
api.Logger.Warn(ctx, "tailnet coordinator client error", slog.Error(err))
|
||||
}
|
||||
_ = agentConn.Close()
|
||||
}
|
||||
}()
|
||||
|
Reference in New Issue
Block a user