Skip to content

winget source reset <name> removes default sources #1575

Open
0 of 1 issue completed
Open
Bug
0 of 1 issue completed
@JohnMcPMS

Description

Brief description of your issue

winget source reset <name> removes the named source when it is a default rather than resetting it. This is because DropSource just removes the source from the list without invoking its Remove as intended, but for a default source the removal from the list places a tombstone.

For a default source we should actually drop any existing item or tombstone in the list (save the platform special case). The result should be that resetting a default source by name gets you the exact same state as a clean install would for that source (source is configured but has empty metadata).

Steps to reproduce

winget source reset msstore

Expected behavior

The default source is still configured but without metadata. Agreements are reset for instance.

Actual behavior

The source is removed (dropped really).

Environment

> winget --info
Windows Package Manager v1.1.12702
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.22474.1000
Package: Microsoft.DesktopAppInstaller v1.16.12702.0

Sub-issues

Activity

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

Metadata

Assignees

No one assigned

    Labels

    Command-SourceIssue related to WinGet SourceIssue-BugIt either shouldn't be doing this or needs an investigation.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions