mirror of
https://github.com/rbalsleyMSFT/FFU.git
synced 2026-06-14 02:09:35 -06:00
Merge pull request #380 from dodexahedron/fix-winget-check-fail-if-multiple-versions-present
Fix failure on winget check if multiple versions exist
This commit is contained in:
@@ -340,7 +340,7 @@ function Confirm-WingetInstallationUI {
|
||||
# Initial Check
|
||||
WriteLog "Confirm-WingetInstallationUI: Starting checks..."
|
||||
$cliStatus = Test-WingetCLI
|
||||
$module = Get-InstalledModule -Name Microsoft.WinGet.Client -ErrorAction SilentlyContinue
|
||||
$module = @(Get-InstalledModule -Name Microsoft.WinGet.Client -ErrorAction SilentlyContinue) | Sort-Object -Top 1 -Descending Version -ErrorAction SilentlyContinue
|
||||
|
||||
$result.CliVersion = $cliStatus.Version
|
||||
$result.ModuleVersion = if ($null -ne $module) { $module.Version.ToString() } else { "Not installed" }
|
||||
|
||||
Reference in New Issue
Block a user