Code Formatting

This commit is contained in:
Marterich 2024-08-22 22:54:44 +02:00
parent 579030eeb9
commit 7f482d5e4b
4 changed files with 5 additions and 5 deletions

View File

@ -78,7 +78,7 @@ function Install-WinUtilProgramChoco {
if ($manage -eq "Uninstalling") { if ($manage -eq "Uninstalling") {
Write-Host "Searching for Metapackages of of $($Program.choco) (.install or .portable)" Write-Host "Searching for Metapackages of of $($Program.choco) (.install or .portable)"
$chocoPackages = ((choco list | Select-String -Pattern "$($Program.choco)(\.install|\.portable){0,1}").Matches.Value) -join " " $chocoPackages = ((choco list | Select-String -Pattern "$($Program.choco)(\.install|\.portable) {0,1}").Matches.Value) -join " "
Write-Host "Starting uninstall of $chocoPackages with Chocolatey." Write-Host "Starting uninstall of $chocoPackages with Chocolatey."
try { try {
$uninstallOutputFilePath = "$env:TEMP\Install-WinUtilProgramChoco.uninstall-command.output.txt" $uninstallOutputFilePath = "$env:TEMP\Install-WinUtilProgramChoco.uninstall-command.output.txt"

View File

@ -13,7 +13,7 @@ Function Invoke-WinUtilCurrentSystem {
param( param(
$CheckBox $CheckBox
) )
if ($CheckBox -eq "choco"){ if ($CheckBox -eq "choco") {
$apps = (choco list | Select-String -Pattern "^\S+").Matches.Value $apps = (choco list | Select-String -Pattern "^\S+").Matches.Value
$filter = Get-WinUtilVariables -Type Checkbox | Where-Object {$psitem -like "WPFInstall*"} $filter = Get-WinUtilVariables -Type Checkbox | Where-Object {$psitem -like "WPFInstall*"}
$sync.GetEnumerator() | Where-Object {$psitem.Key -in $filter} | ForEach-Object { $sync.GetEnumerator() | Where-Object {$psitem.Key -in $filter} | ForEach-Object {

View File

@ -91,7 +91,7 @@ $xaml.SelectNodes("//*[@Name]") | ForEach-Object {$sync["$("$($psitem.Name)")"]
$ChocoPreferencePath = "$env:LOCALAPPDATA\winutil\preferChocolatey.ini" $ChocoPreferencePath = "$env:LOCALAPPDATA\winutil\preferChocolatey.ini"
$sync.WPFpreferChocolatey.Add_Checked({New-Item -Path $ChocoPreferencePath -Force }) $sync.WPFpreferChocolatey.Add_Checked({New-Item -Path $ChocoPreferencePath -Force })
$sync.WPFpreferChocolatey.Add_Unchecked({Remove-Item $ChocoPreferencePath -Force}) $sync.WPFpreferChocolatey.Add_Unchecked({Remove-Item $ChocoPreferencePath -Force})
if (Test-Path $ChocoPreferencePath){ if (Test-Path $ChocoPreferencePath) {
$sync.WPFpreferChocolatey.IsChecked = $true $sync.WPFpreferChocolatey.IsChecked = $true
} }