File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -927,7 +927,24 @@ jobs:
927927 exit 0
928928 }
929929
930- & $winget.Source validate --manifest "${{ steps.winget_manifest.outputs.manifest_dir }}" --disable-interactivity
930+ $output = & $winget.Source validate --manifest "${{ steps.winget_manifest.outputs.manifest_dir }}" --disable-interactivity 2>&1
931+ $exit = $LASTEXITCODE
932+ $output | ForEach-Object { Write-Host $_ }
933+
934+ if ($exit -eq 0) {
935+ exit 0
936+ }
937+
938+ # `winget validate` returns a non-zero exit code even when the manifest
939+ # is valid but produced warnings (e.g., the runner's winget predates the
940+ # 1.12.0 schema URL pattern). Treat that case as success; the winget-pkgs
941+ # bot performs authoritative validation when the PR is opened.
942+ if (($output -join "`n") -match 'Manifest validation succeeded with warnings\.') {
943+ Write-Host "::notice::winget validate reported only warnings; continuing."
944+ exit 0
945+ }
946+
947+ exit $exit
931948
932949 - name : Submit package to WinGet
933950 shell : pwsh
You can’t perform that action at this time.
0 commit comments