You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// If the client is unauthenticated we can ignore the check.
75
+
// The child commands should handle an unauthenticated client.
76
+
ifxerrors.Is(err, errUnauthenticated) {
77
+
returnnil
78
+
}
79
+
iferr!=nil {
80
+
returnxerrors.Errorf("create client: %w", err)
81
+
}
82
+
returncheckVersions(cmd, client)
62
83
},
84
+
63
85
Example: ` Start a Coder server.
64
86
`+cliui.Styles.Code.Render("$ coder server") +`
65
87
@@ -99,6 +121,7 @@ func Root() *cobra.Command {
99
121
100
122
cmd.PersistentFlags().String(varURL, "", "Specify the URL to your deployment.")
101
123
cmd.PersistentFlags().String(varToken, "", "Specify an authentication token.")
124
+
cliflag.BoolVarP(cmd.PersistentFlags(), &varNoVersionCheck, "no-version-warning", "", envNoVersionCheck, false, "Suppress warning when client and server versions do not match.")
102
125
cliflag.String(cmd.PersistentFlags(), varAgentToken, "", "CODER_AGENT_TOKEN", "", "Specify an agent authentication token.")
103
126
_=cmd.PersistentFlags().MarkHidden(varAgentToken)
104
127
cliflag.String(cmd.PersistentFlags(), varAgentURL, "", "CODER_AGENT_URL", "", "Specify the URL for an agent to access your deployment.")
_, _=fmt.Fprintf(cmd.OutOrStdout(), warn.Render("download the appropriate version from https://github.com/coder/coder/releases/tag/%s"), info.TrimmedVersion())
0 commit comments