mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-07-04 20:23:52 -05:00
Add Another Catch Statement with some 'Write-Warning' for Extra Information
This commit is contained in:
@ -25,8 +25,12 @@ function Test-WinUtilPackageManager {
|
||||
try {
|
||||
$wingetVersionFull = winget --version
|
||||
} catch [System.Management.Automation.CommandNotFoundException], [System.Management.Automation.ApplicationFailedException] {
|
||||
Write-Warning "Winget was not found due to un-availablity reasons"
|
||||
$wingetExists = $false
|
||||
}
|
||||
} catch {
|
||||
Write-Warning "Winget was not found due to un-known reasons, The Stack Trace is:`n$($psitem.Exception.StackTrace)"
|
||||
$wingetExists = $false
|
||||
}
|
||||
|
||||
# If Winget is available, Parse it's Version and give proper information to Terminal Output.
|
||||
# If it isn't available, the return of this funtion will be "not-installed", indicating that
|
||||
|
Reference in New Issue
Block a user