diff --git a/cli/root.go b/cli/root.go index fe6d5c4ccd8a9..5a3c20a6e5ee1 100644 --- a/cli/root.go +++ b/cli/root.go @@ -1366,7 +1366,7 @@ func defaultUpgradeMessage(version string) string { // to the GitHub release page to download the latest installer. version = strings.TrimPrefix(version, "v") if runtime.GOOS == "windows" { - return fmt.Sprintf("download the server version from: https://github.com/coder/coder/releases/v%s", version) + return "" } return fmt.Sprintf("download the server version with: 'curl -L https://coder.com/install.sh | sh -s -- --version %s'", version) } @@ -1412,8 +1412,8 @@ func wrapTransportWithVersionMismatchCheck(rt http.RoundTripper, inv *serpent.In switch { case serverInfo.UpgradeMessage != "": upgradeMessage = serverInfo.UpgradeMessage - // The site-local `install.sh` was introduced in v2.19.0 - case serverInfo.DashboardURL != "" && semver.Compare(semver.MajorMinor(serverVersion), "v2.19") >= 0: + // The site-local `install.sh` was introduced in v2.19.0. Skip curl instruction on Windows. + case runtime.GOOS != "windows" && serverInfo.DashboardURL != "" && semver.Compare(semver.MajorMinor(serverVersion), "v2.19") >= 0: upgradeMessage = fmt.Sprintf("download %s with: 'curl -fsSL %s/install.sh | sh'", serverVersion, serverInfo.DashboardURL) } }