Skip to content

Reset default sources without dropping them#6187

Open
Trenly wants to merge 4 commits intomicrosoft:masterfrom
Trenly:Source
Open

Reset default sources without dropping them#6187
Trenly wants to merge 4 commits intomicrosoft:masterfrom
Trenly:Source

Conversation

@Trenly
Copy link
Copy Markdown
Contributor

@Trenly Trenly commented Apr 29, 2026


Microsoft Reviewers: Open in CodeFlow

@Trenly Trenly requested a review from a team as a code owner April 29, 2026 03:51
@microsoft-github-policy-service microsoft-github-policy-service Bot added the Issue-Bug It either shouldn't be doing this or needs an investigation. label Apr 29, 2026
@github-actions

This comment has been minimized.

Comment thread src/AppInstallerRepositoryCore/SourceList.cpp Outdated
Comment thread src/AppInstallerRepositoryCore/SourceList.cpp Outdated
Comment thread src/AppInstallerRepositoryCore/SourceList.cpp Outdated
{
SourceList sourceList;

auto source = sourceList.GetCurrentSource(name);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While we are at it, should we also get tombstones here so you can reset winget if you have removed it?

Comment on lines +1067 to +1071

if (!metadataSet)
{
OverwriteSourceList();
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (!metadataSet)
{
OverwriteSourceList();
}

We don't need to reload the source list after failing to update the metadata.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Issue-Bug It either shouldn't be doing this or needs an investigation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

winget source reset <name> removes default sources

2 participants