mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
Fix invalid check if web response has errors
This commit is contained in:
parent
d9e5551ad5
commit
6606e73226
1 changed files with 1 additions and 1 deletions
|
|
@ -72,7 +72,7 @@ function Get-IcingaPowerShellModuleArchive()
|
||||||
} else {
|
} else {
|
||||||
$WebResponse = Invoke-IcingaWebRequest -Uri 'https://github.com/{0}/{1}/releases/latest' -Objects $GitHubUser, $Repository -UseBasicParsing;
|
$WebResponse = Invoke-IcingaWebRequest -Uri 'https://github.com/{0}/{1}/releases/latest' -Objects $GitHubUser, $Repository -UseBasicParsing;
|
||||||
|
|
||||||
if ($WebResponse.HasErrors -eq $FALSE) {
|
if ($null -eq $WebResponse.HasErrors -Or $WebResponse.HasErrors -eq $FALSE) {
|
||||||
$LatestRelease = $WebResponse.BaseResponse.ResponseUri.AbsoluteUri;
|
$LatestRelease = $WebResponse.BaseResponse.ResponseUri.AbsoluteUri;
|
||||||
$DownloadUrl = $LatestRelease.Replace('/releases/tag/', '/archive/');
|
$DownloadUrl = $LatestRelease.Replace('/releases/tag/', '/archive/');
|
||||||
$Tag = $DownloadUrl.Split('/')[-1];
|
$Tag = $DownloadUrl.Split('/')[-1];
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue