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