Skip to content

feat: add version checking to CLI #2643

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
Jun 29, 2022
Prev Previous commit
Next Next commit
Merge branch 'main' into jon/version
  • Loading branch information
sreya committed Jun 27, 2022
commit fc3fbb59f7e2610f7e0a79b0e62746fbe07576de
5 changes: 3 additions & 2 deletions cli/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ const (
var (
errUnauthenticated = xerrors.New(notLoggedInMessage)
varSuppressVersion = false
envSessionToken = "CODER_SESSION_TOKEN"
)

func init() {
Expand Down Expand Up @@ -126,9 +127,9 @@ func Root() *cobra.Command {
cmd.SetUsageTemplate(usageTemplate())

cmd.PersistentFlags().String(varURL, "", "Specify the URL to your deployment.")
cmd.PersistentFlags().String(varToken, "", "Specify an authentication token.")
cliflag.BoolVarP(cmd.PersistentFlags(), &varSuppressVersion, "no-version-warning", "", envNoVersionCheck, false, "Suppress warning when client and server versions do not match.")
cliflag.String(cmd.PersistentFlags(), varAgentToken, "", "CODER_AGENT_TOKEN", "", "Specify an agent authentication token.")
=======
>>>>>>> main
_ = cmd.PersistentFlags().MarkHidden(varAgentToken)
cliflag.String(cmd.PersistentFlags(), varAgentURL, "", "CODER_AGENT_URL", "", "Specify the URL for an agent to access your deployment.")
_ = cmd.PersistentFlags().MarkHidden(varAgentURL)
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.