microsoft / microsoft/winget-cli

Reset-WinGetSource removes the source, but does not add it back

Open
#4,689 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Command-Source Issue-Bug PowerShell
Dominant language
C++
Stars
26.4k
Forks
1.8k
Avg merge
1d 11h
Merged PRs (30d)
15

Description

Brief description of your issue

Reset should remove and "re-add" a source.

Steps to reproduce
PS C:\Users\denelon> Reset-WinGetSource -Name msstore
PS C:\Users\denelon> Get-WinGetSource

Name   Argument                               Type
----   --------                               ----
winget https://cdn.winget.microsoft.com/cache Microsoft.PreIndexed.Package

PS C:\Users\denelon> winget source reset
The following sources will be reset if the --force option is given:
Name   Argument                               Explicit
------------------------------------------------------
winget https://cdn.winget.microsoft.com/cache false
PS C:\Users\denelon> winget source reset --force
Resetting all sources...Done
PS C:\Users\denelon> winget source list
Name    Argument                                      Explicit
--------------------------------------------------------------
msstore https://storeedgefd.dsx.mp.microsoft.com/v9.0 false
winget  https://cdn.winget.microsoft.com/cache        false

Expected behavior

The source should have been retained.

Actual behavior

The source was removed.

Environment
Microsoft.WinGet.Client 1.8.1133

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the behavior with Reset-WinGetSource -Name msstore, then compare it with winget source reset --force and inspect the Reset-WinGetSource entry point. Done means resetting a named source removes and re-adds it, so Get-WinGetSource lists msstore afterward.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, powershell
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.