mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-10-19 02:28:59 +00:00
Normalize v prefix in install.ps1 agent version check
The Windows installer compared the downloaded agent's --version output (v6.0.5) against the server's /api/version value (6.0.5) literally, so every matching install still warned about a version mismatch (#1527). Strip the leading v from both sides before comparing, matching what install.sh already does.
This commit is contained in:
parent
84d43e16e4
commit
4421945e9b
1 changed files with 4 additions and 1 deletions
|
|
@ -873,7 +873,10 @@ try {
|
|||
$DownloadedVersion = ""
|
||||
}
|
||||
|
||||
if (-not [string]::IsNullOrWhiteSpace($ServerVersion) -and -not [string]::IsNullOrWhiteSpace($DownloadedVersion) -and $DownloadedVersion -ne $ServerVersion) {
|
||||
$DownloadedVersionNormalized = $DownloadedVersion.TrimStart('v')
|
||||
$ServerVersionNormalized = $ServerVersion.TrimStart('v')
|
||||
|
||||
if (-not [string]::IsNullOrWhiteSpace($ServerVersion) -and -not [string]::IsNullOrWhiteSpace($DownloadedVersion) -and $DownloadedVersionNormalized -ne $ServerVersionNormalized) {
|
||||
Write-Host "Warning: downloaded agent version ($DownloadedVersion) does not match Pulse server version ($ServerVersion). Check that Pulse is upgraded and that any reverse proxy is not serving a stale cached binary." -ForegroundColor Yellow
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue