From 9c9d268340d86589c859bbbf5a1fc6c5b91c6a3b Mon Sep 17 00:00:00 2001 From: Andrzej Demski <75534654+AndrewDemski-ad-gmail-com@users.noreply.github.com> Date: Sat, 13 Jan 2024 17:13:27 +0100 Subject: [PATCH] Update Winget-Upgrade.ps1 Quick-Fix for bug reported in https://github.com/Romanitho/Winget-AutoUpdate/issues/543 Summary: with additional parameters we filter files (and ignore folders), then drill it down to PS1 files, also proactively we ignore sub-folders if such are present. --- Sources/WAU/Winget-AutoUpdate/Winget-Upgrade.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/WAU/Winget-AutoUpdate/Winget-Upgrade.ps1 b/Sources/WAU/Winget-AutoUpdate/Winget-Upgrade.ps1 index 0fe702a..00e1803 100644 --- a/Sources/WAU/Winget-AutoUpdate/Winget-Upgrade.ps1 +++ b/Sources/WAU/Winget-AutoUpdate/Winget-Upgrade.ps1 @@ -3,7 +3,7 @@ #Get the Working Dir $Script:WorkingDir = $PSScriptRoot #Get Functions -Get-ChildItem "$WorkingDir\functions" | ForEach-Object { . $_.FullName } +Get-ChildItem "$WorkingDir\functions" -File -Filter "*.ps1" -Depth 0 | ForEach-Object { . $_.FullName } <# MAIN #>