mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2026-02-20 09:26:25 +00:00
Update winget check (#484)
This commit is contained in:
@@ -185,7 +185,7 @@ catch {
|
||||
|
||||
# Check if WinGet is installed & if it is, check if the version is at least v1.4
|
||||
try {
|
||||
if ([int](((winget -v) -replace 'v','').split('.')[0..1] -join '') -gt 14) {
|
||||
if (Get-Command winget -ErrorAction SilentlyContinue) {
|
||||
$script:WingetInstalled = $true
|
||||
}
|
||||
else {
|
||||
@@ -193,6 +193,7 @@ try {
|
||||
}
|
||||
}
|
||||
catch {
|
||||
Write-Error "Unable to determine if WinGet is installed, winget command failed: $_"
|
||||
$script:WingetInstalled = $false
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user