Clean up / Linting

This commit is contained in:
Raphire
2025-05-07 15:51:01 +02:00
parent 8def22ac48
commit 8bc11bd7c8

View File

@@ -98,7 +98,7 @@ function ShowAppSelectionForm {
$global:SelectedApps = $selectionBox.CheckedItems
# Create file that stores selected apps if it doesn't exist
if (!(Test-Path "$PSScriptRoot/CustomAppsList")) {
if (-not (Test-Path "$PSScriptRoot/CustomAppsList")) {
$null = New-Item "$PSScriptRoot/CustomAppsList"
}
@@ -673,7 +673,7 @@ function AddParameter {
}
# Create or clear file that stores last used settings
if (!(Test-Path "$PSScriptRoot/SavedSettings")) {
if (-not (Test-Path "$PSScriptRoot/SavedSettings")) {
$null = New-Item "$PSScriptRoot/SavedSettings"
}
elseif ($global:FirstSelection) {
@@ -1194,7 +1194,11 @@ if (-not ($global:Params.ContainsKey("Verbose"))) {
$ProgressPreference = 'SilentlyContinue'
}
else {
Read-Host "Verbose mode is enabled, press enter to continue"
Write-Host "Verbose mode is enabled"
Write-Output ""
Write-Output "Press any key to continue..."
$null = [System.Console]::ReadKey()
$ProgressPreference = 'Continue'
}
@@ -1355,6 +1359,7 @@ if ((-not $global:Params.Count) -or $RunDefaults -or $RunWin11Defaults -or $RunS
# Suppress prompt if Silent parameter was passed
if (-not $Silent) {
Write-Output ""
Write-Output ""
Write-Output "Press enter to remove the selected apps or press CTRL+C to quit..."
Read-Host | Out-Null