fix: improve error handling for ekDNSHelper version check
This commit is contained in:
@@ -4,11 +4,13 @@ $DNSHelperRequiredVersion = '2.2.0'
|
|||||||
$DownloadRequired = $false
|
$DownloadRequired = $false
|
||||||
|
|
||||||
If (Test-Path $DNSHelper) {
|
If (Test-Path $DNSHelper) {
|
||||||
$versionOutput = (& $DNSHelper | Select-Object -First 1)
|
$versionOutput = (& $DNSHelper 2>&1 | Select-Object -First 1)
|
||||||
If ($versionOutput -match 'v(\d+\.\d+\.\d+)') {
|
If ($versionOutput -match 'v(\d+\.\d+\.\d+)') {
|
||||||
If ($Matches[1] -ne $DNSHelperRequiredVersion) {
|
If ($Matches[1] -ne $DNSHelperRequiredVersion) {
|
||||||
$DownloadRequired = $true
|
$DownloadRequired = $true
|
||||||
}
|
}
|
||||||
|
} Else {
|
||||||
|
$DownloadRequired = $true
|
||||||
}
|
}
|
||||||
} Else {
|
} Else {
|
||||||
$DownloadRequired = $true
|
$DownloadRequired = $true
|
||||||
|
|||||||
Reference in New Issue
Block a user