Skip to content

Add packaged source fallback for noninteractive runs#6347

Open
PrzemyslawKlys wants to merge 7 commits into
microsoft:masterfrom
PrzemyslawKlys:fix/noninteractive-source-init
Open

Add packaged source fallback for noninteractive runs#6347
PrzemyslawKlys wants to merge 7 commits into
microsoft:masterfrom
PrzemyslawKlys:fix/noninteractive-source-init

Conversation

@PrzemyslawKlys

@PrzemyslawKlys PrzemyslawKlys commented Jul 3, 2026

Copy link
Copy Markdown

📖 Description

Fixes packaged source initialization for noninteractive runs where the MSIX source package cannot be deployed for the current user session.

In this case, opening the packaged source can fail before the source index is available, which leaves commands such as winget list unable to query the default winget source.

This change adds a local fallback copy of the packaged source index. When packaged deployment is blocked in a noninteractive context, winget can open the fallback source data instead of failing the source open completely.

The fallback is kept in sync after successful packaged source updates and is only preferred when it is newer or when the packaged source cannot be opened. Invalid or unusable fallback data is treated as missing so future source updates can repair it.

🔗 References

Fixes #6334.

🔍 Validation

Validated with focused repository-core build coverage and a live noninteractive Windows Server 2025 remoting scenario:

  • current shipping winget reproduced the packaged source deployment failure and returned no winget source results
  • the updated development build completed winget list successfully using the winget source
  • logs showed the packaged deployment failure followed by the local fallback source path being used

Also validated focused source fallback behavior around:

  • missing fallback data
  • corrupt fallback version metadata
  • successful packaged source updates refreshing fallback data
  • newer fallback selection
  • fallback invalidation when a newer fallback cannot be opened

✅ Checklist

📋 Issue Type

  • Bug fix
  • Feature
  • Task
Microsoft Reviewers: Open in CodeFlow

@PrzemyslawKlys PrzemyslawKlys requested a review from a team as a code owner July 3, 2026 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Failing to add WinGet Source in non-interactive session

1 participant