-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Reset-WinGetSource behavior #4732
Conversation
@@ -15,17 +15,25 @@ Resets default WinGet sources. | |||
## SYNTAX | |||
|
|||
``` | |||
Reset-WinGetSource -Name <String> [<CommonParameters>] | |||
Reset-WinGetSource [-Name <String>] [<CommonParameters>] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I worry somewhat about this being too easy to destroy state; the reason one needs to specify --force
to winget.exe.
Maybe it should be two parameter sets, a default set with -Name
and another one with -All
. That way just running > Reset-WinGetSource
doesn't immediately try to reset everything, but instead asks for a name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I created two parameters sets (DefaultSet and OptionalSet) so that we keep the default behavior of requiring the Name parameter. I also added an optional -All switch parameter that resets all sources.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't Name
and All
be required within their respective parameter set?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed brackets so they show up as being required.
@@ -15,17 +15,25 @@ Resets default WinGet sources. | |||
## SYNTAX | |||
|
|||
``` | |||
Reset-WinGetSource -Name <String> [<CommonParameters>] | |||
Reset-WinGetSource [-Name <String>] [<CommonParameters>] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't Name
and All
be required within their respective parameter set?
Issue:
Reset-WinGetSource required a name which does not match the current behavior of
winget source reset
.Changes:
Microsoft Reviewers: Open in CodeFlow