From 372806e5aab4ef2bb71b36f08a189807fbbc83a2 Mon Sep 17 00:00:00 2001 From: Brandon Thetford Date: Thu, 15 Jan 2026 14:53:30 -0700 Subject: [PATCH 1/4] 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" } From b21cb0bbf63495df1bfad8724fbe51725ff31304 Mon Sep 17 00:00:00 2001 From: Brandon Thetford Date: Thu, 15 Jan 2026 14:58:11 -0700 Subject: [PATCH 2/4] Actually include the global parameter --- 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 a7abc8b..e0fdd04 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 = Import-Module -Name Microsoft.WinGet.Client -ErrorAction SilentlyContinue -PassThru + $module = Import-Module -Name Microsoft.WinGet.Client -ErrorAction SilentlyContinue -PassThru -Global $result.CliVersion = $cliStatus.Version $result.ModuleVersion = if ($null -ne $module) { $module.Version.ToString() } else { "Not installed" } From e8aa1b5b4aa2e7a155e5f767f375b422d8c3bed1 Mon Sep 17 00:00:00 2001 From: Brandon Thetford Date: Thu, 15 Jan 2026 15:19:12 -0700 Subject: [PATCH 3/4] Get instead of import, as an array, and get the best available --- 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 e0fdd04..68c152c 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 = Import-Module -Name Microsoft.WinGet.Client -ErrorAction SilentlyContinue -PassThru -Global + $module = $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" } From d0e17eb0f7d6e665009a6aca05910107c43f13ff Mon Sep 17 00:00:00 2001 From: Brandon Thetford Date: Thu, 15 Jan 2026 15:21:21 -0700 Subject: [PATCH 4/4] =?UTF-8?q?No=20need=20to=20double-assign=20?= =?UTF-8?q?=F0=9F=AB=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 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 68c152c..a66049f 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 = $module = @(Get-InstalledModule -Name Microsoft.WinGet.Client -ErrorAction SilentlyContinue) | Sort-Object -Top 1 -Descending Version -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" }