mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-07-04 20:23:52 -05:00
Add Comments to be make The Logic a Lot More Clear to Follow and Understand
This commit is contained in:
@ -20,7 +20,7 @@ function Test-WinUtilPackageManager {
|
|||||||
$status = "not-installed"
|
$status = "not-installed"
|
||||||
|
|
||||||
if ($winget) {
|
if ($winget) {
|
||||||
# Get Winget Version and Install it if not detected
|
# Check if Winget is available while getting it's Version if it's available
|
||||||
$wingetExists = $true
|
$wingetExists = $true
|
||||||
try {
|
try {
|
||||||
$wingetVersionFull = winget --version
|
$wingetVersionFull = winget --version
|
||||||
@ -28,7 +28,10 @@ function Test-WinUtilPackageManager {
|
|||||||
$wingetExists = $false
|
$wingetExists = $false
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($wingetExists) {
|
# 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
|
||||||
|
# Winget isn't installed/available on The System.
|
||||||
|
if ($wingetExists) {
|
||||||
# Check if Preview Version
|
# Check if Preview Version
|
||||||
if ($wingetVersionFull.Contains("-preview")) {
|
if ($wingetVersionFull.Contains("-preview")) {
|
||||||
$wingetVersion = $wingetVersionFull.Trim("-preview")
|
$wingetVersion = $wingetVersionFull.Trim("-preview")
|
||||||
|
Reference in New Issue
Block a user