mirror of
https://github.com/coder/coder.git
synced 2026-10-25 09:42:55 +08:00
feat: add customizable upgrade message on client/server version mismatch (#11587)
This commit is contained in:
+2
-1
@@ -18,6 +18,7 @@ import (
|
||||
|
||||
"github.com/coder/pretty"
|
||||
|
||||
"github.com/coder/coder/v2/buildinfo"
|
||||
"github.com/coder/coder/v2/cli/clibase"
|
||||
"github.com/coder/coder/v2/cli/cliui"
|
||||
"github.com/coder/coder/v2/coderd/userpassword"
|
||||
@@ -175,7 +176,7 @@ func (r *RootCmd) login() *clibase.Cmd {
|
||||
// Try to check the version of the server prior to logging in.
|
||||
// It may be useful to warn the user if they are trying to login
|
||||
// on a very old client.
|
||||
err = r.checkVersions(inv, client)
|
||||
err = r.checkVersions(inv, client, buildinfo.Version())
|
||||
if err != nil {
|
||||
// Checking versions isn't a fatal error so we print a warning
|
||||
// and proceed.
|
||||
|
||||
Reference in New Issue
Block a user