Merge pull request #143 from KnifMelti/main

Fixing -NoClean a little
pull/144/head
Romain 2022-08-11 09:17:11 +02:00 committed by GitHub
commit 8a6e3e34e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 1 deletions

View File

@ -204,13 +204,21 @@ function Install-WingetAutoUpdate {
} }
} }
elseif (!(Test-Path "$WingetUpdatePath\included_apps.txt")) { elseif (!(Test-Path "$WingetUpdatePath\included_apps.txt")) {
New-Item -Path $WingetUpdatePath -Name "included_apps.txt" -ItemType "file" -ErrorAction SilentlyContinue | Out-Null if ((Test-Path "$PSScriptRoot\included_apps.txt")) {
Copy-Item -Path "$PSScriptRoot\included_apps.txt" -Destination $WingetUpdatePath -Recurse -Force -ErrorAction SilentlyContinue
}
else {
New-Item -Path $WingetUpdatePath -Name "included_apps.txt" -ItemType "file" -ErrorAction SilentlyContinue | Out-Null
}
} }
} }
else { else {
if (!$NoClean) { if (!$NoClean) {
Copy-Item -Path "$PSScriptRoot\excluded_apps.txt" -Destination $WingetUpdatePath -Recurse -Force -ErrorAction SilentlyContinue Copy-Item -Path "$PSScriptRoot\excluded_apps.txt" -Destination $WingetUpdatePath -Recurse -Force -ErrorAction SilentlyContinue
} }
elseif (!(Test-Path "$WingetUpdatePath\excluded_apps.txt")) {
Copy-Item -Path "$PSScriptRoot\excluded_apps.txt" -Destination $WingetUpdatePath -Recurse -Force -ErrorAction SilentlyContinue
}
} }
# Set dummy regkeys for notification name and icon # Set dummy regkeys for notification name and icon