From 9eec615eff4b26d4da5d7f243bd9937270969e63 Mon Sep 17 00:00:00 2001 From: Marterich Date: Thu, 7 Mar 2024 21:29:36 +0100 Subject: [PATCH] Document Formatting --- functions/private/Test-WinUtilPackageManager.ps1 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/functions/private/Test-WinUtilPackageManager.ps1 b/functions/private/Test-WinUtilPackageManager.ps1 index 4a285f81..9d031687 100644 --- a/functions/private/Test-WinUtilPackageManager.ps1 +++ b/functions/private/Test-WinUtilPackageManager.ps1 @@ -19,11 +19,11 @@ function Test-WinUtilPackageManager { # Install Winget if not detected $wingetExists = Get-Command -Name winget -ErrorAction SilentlyContinue - if ($wingetExists) { + if ($wingetExists) { $wingetversionfull = (winget --version) $wingetversiontrim = $wingetversionfull.Trim('v') - if ($wingetversiontrim.EndsWith("-preview")){ - $wingetversiontrim = $wingetversiontrim.Trim('-preview') + if ($wingetversiontrim.EndsWith("-preview")) { + $wingetversiontrim = $wingetversiontrim.Trim('-preview') $wingetpreview = $true } $wingetVersion = [System.Version]::Parse($wingetversiontrim) @@ -43,17 +43,17 @@ function Test-WinUtilPackageManager { if ($winget) { if ($wingetExists -and !$wingetOutdated) { - if (!$wingetpreview){ + if (!$wingetpreview) { Write-Host "- Winget up-to-date" - } else{ + } else { Write-Host "- Winget preview version detected. Unexptected problems may occur" -ForegroundColor Yellow } return $true } } - if($choco){ - if ((Get-Command -Name choco -ErrorAction Ignore) -and ($chocoVersion = (Get-Item "$env:ChocolateyInstall\choco.exe" -ErrorAction Ignore).VersionInfo.ProductVersion)){ + if ($choco) { + if ((Get-Command -Name choco -ErrorAction Ignore) -and ($chocoVersion = (Get-Item "$env:ChocolateyInstall\choco.exe" -ErrorAction Ignore).VersionInfo.ProductVersion)) { Write-Host "Chocolatey v$chocoVersion" return $true }