From 372806e5aab4ef2bb71b36f08a189807fbbc83a2 Mon Sep 17 00:00:00 2001 From: Brandon Thetford Date: Thu, 15 Jan 2026 14:53:30 -0700 Subject: [PATCH] Fix failure on winget check if multiple versions exist Also imports the module at this step, globally --- FFUDevelopment/FFUUI.Core/FFUUI.Core.Winget.psm1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FFUDevelopment/FFUUI.Core/FFUUI.Core.Winget.psm1 b/FFUDevelopment/FFUUI.Core/FFUUI.Core.Winget.psm1 index 7a8c8f9..a7abc8b 100644 --- a/FFUDevelopment/FFUUI.Core/FFUUI.Core.Winget.psm1 +++ b/FFUDevelopment/FFUUI.Core/FFUUI.Core.Winget.psm1 @@ -323,7 +323,7 @@ function Confirm-WingetInstallationUI { # Initial Check WriteLog "Confirm-WingetInstallationUI: Starting checks..." $cliStatus = Test-WingetCLI - $module = Get-InstalledModule -Name Microsoft.WinGet.Client -ErrorAction SilentlyContinue + $module = Import-Module -Name Microsoft.WinGet.Client -ErrorAction SilentlyContinue -PassThru $result.CliVersion = $cliStatus.Version $result.ModuleVersion = if ($null -ne $module) { $module.Version.ToString() } else { "Not installed" }