Compare commits

...

3 Commits

3 changed files with 11 additions and 7 deletions

View File

@@ -7,5 +7,5 @@
Description = 'Enable suggestions on how to install missing commands via winget'
PowerShellVersion = '7.4'
NestedModules = @('PowerToys.CmdNotFound.dll')
RequiredModules = @(@{ModuleName = 'Microsoft.WinGet.Client'; ModuleVersion = "0.2.1"; })
RequiredModules = @(@{ModuleName = 'Microsoft.WinGet.Client'; ModuleVersion = "1.8.1133"; })
}

View File

@@ -1,8 +1,12 @@
if (Get-Module -ListAvailable -Name Microsoft.WinGet.Client)
{
Write-Host "WinGet Client module detected."
# This message will be compared against in Command Not Found Settings page code behind. Take care when changing it.
}
$wingetModule = Get-Module -ListAvailable -Name Microsoft.WinGet.Client
if ($wingetModule) {
if ($wingetModule.Version -ge "1.8.1133") {
Write-Host "WinGet Client module detected."
# This message will be compared against in Command Not Found Settings page code behind. Take care when changing it.
} else {
Upgrade-Module -Name Microsoft.WinGet.Client
}
}
else {
Install-Module -Name Microsoft.WinGet.Client
if (Get-Module -ListAvailable -Name Microsoft.WinGet.Client)

View File

@@ -65,7 +65,7 @@
BorderThickness="0"
CornerRadius="0"
IsClosable="False"
IsOpen="{x:Bind Mode=OneWay, Path=ViewModel.IsArm64Arch, Converter={StaticResource BoolNegationConverter}}">
IsOpen="True">
<InfoBar.ActionButton>
<HyperlinkButton x:Uid="CmdNotFound_CheckCompatibility" Command="{x:Bind ViewModel.CheckRequirementsEventHandler}">
<ToolTipService.ToolTip>