This repository has been archived by the owner on Oct 25, 2022. It is now read-only.
This repository has been archived by the owner on Oct 25, 2022. It is now read-only.
Closed
Description
People may accidentally return something else and it stops working. Example:
microsoftazurestorageexplorer
au_GetLatest failed
au_GetLatest doesn't return a HashTable result but System.Object[]
With this updater:
function global:au_GetLatest {
$homepage_content = Invoke-WebRequest -UseBasicParsing -Uri $homepage
# Get Version
$homepage_content -match '(Version \d+.\d+.\d+)' #<--------- OFFENDING LINE, RETURNS A VALUE
$version = $matches[1] -replace "Version ", ""
$Latest = @{ URL = $url; Version = $version }
return $Latest
}
For this reason just take a last value returned and compalin if its not a [HashTable]