From e250e2a1307ed70753b2720ac752b79009f1fbb5 Mon Sep 17 00:00:00 2001 From: rbalsleyMSFT <53497092+rbalsleyMSFT@users.noreply.github.com> Date: Tue, 13 Aug 2024 16:11:36 -0700 Subject: [PATCH] Changed some logging when winget apps can't be found --- FFUDevelopment/BuildFFUVM.ps1 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/FFUDevelopment/BuildFFUVM.ps1 b/FFUDevelopment/BuildFFUVM.ps1 index 96d5779..fab50ad 100644 --- a/FFUDevelopment/BuildFFUVM.ps1 +++ b/FFUDevelopment/BuildFFUVM.ps1 @@ -1764,7 +1764,15 @@ function Get-WinGetApp { ) $wingetSearchResult = & winget.exe search --id "$WinGetAppId" --exact --accept-source-agreements --source winget if ($wingetSearchResult -contains "No package found matching input criteria.") { - WriteLog "$WinGetAppName not found in WinGet repository. Skipping download." + if ($VerbosePreference -ne 'Continue'){ + Write-Error "$WinGetAppName not found in WinGet repository. Skipping download." + Write-Error "Check the AppList.json file and make sure the AppID is correct." + Write-Error "If OS language is not English, winget download may fail. We hope to have this addressed in a future release." + } + WriteLog "$WinGetAppName not found in WinGet repository. Exiting." + WriteLog "Check the AppList.json file and make sure the AppID is correct." + WriteLog "If OS language is not English, winget download may fail. We hope to have this addressed in a future release." + Exit 1 } $appFolderPath = Join-Path -Path "$AppsPath\Win32" -ChildPath $WinGetAppName WriteLog "Creating $appFolderPath"