From 067a5aab1ecb113a65c41dcac86aa3206a1f23ed Mon Sep 17 00:00:00 2001 From: KnifMelti Date: Tue, 11 Oct 2022 23:54:17 +0200 Subject: [PATCH] List error check --- Winget-AutoUpdate/winget-upgrade.ps1 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Winget-AutoUpdate/winget-upgrade.ps1 b/Winget-AutoUpdate/winget-upgrade.ps1 index 79be699..6c9ff00 100644 --- a/Winget-AutoUpdate/winget-upgrade.ps1 +++ b/Winget-AutoUpdate/winget-upgrade.ps1 @@ -83,7 +83,13 @@ if (Test-Network) { Write-Log "Newer List copied/downloaded to local path: $($WAUConfig.InstallLocation)" "Yellow" } else { - Write-Log "List is up to date." "Green" + if ((Test-Path "$WorkingDir\included_apps.txt") -or (Test-Path "$WorkingDir\excluded_apps.txt")) { + Write-Log "List is up to date." "Green" + } + else { + Write-Log "List doesn't exist!." "Red" + Exit 0 + } } }