-
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
PowerShell cmdlet for: winget download <package>
#3972
Comments
My immediate reaction is that the name currently proposed would lead to utter confusion based on described intent. I would suggest that 'Save-WingetPackage' would be more inline with the overall approved-verb list intent for downloading a package without installing it immediately, as well as align with the OneGet and now AnyPackage provider docs for AnyPackage: Save-Package. OneGet and apparently now AnyPackage are the underlying machinery of Powershell's Package Management umbrella. This would allow import and export to remain available for coinciding functions. |
I think "Save-WinGetPackage" does make sense. @ryfu-msft what are your thoughts here? |
I've had discussions with several folks on this particular scenario. TLDR; The cmdlet will be "Export-WinGetPackage". One of the primary use cases we're thinking here is we will have customers who wish to stand up a private source for WinGet packages. When this is the case, some of them would like to use the "winget" source as an "upstream" to capture package installers and manifests so they can "publish" them to their own REST source. In the context of the WinGet CLI command structure vs. the PowerShell cmdlet structure the following paradigm was used to influence our thinking:
WinGet Client winget download In the context of the above scenario, this pattern would be used to "get a package" from one source for subsequent publishing to a different source: PowerShell Module Microsoft.WinGet.Client Microsoft.WinGet.Source In the context of the "Publish-WinGetPackage" we're thinking the "Unpublish-WinGetPackage" would logically be used to remove a package from a WinGet Source. Other Considerations:
|
Description of the new feature / enhancement
I want a PowerShell cmdlet that is essentially the same thing as
winget download
.This command in the CLI downloads a manifest and an installer.
We're leaning towards
Export-WinGetPackage
as the name of the cmdlet.We would not plan to implement an
Import-WinGetPackage
because WinGet uses the InstallerUrl field to determine where the installer should be downloaded from.Additional Context
Unfortunately, this causes a bit of an impedence for the existing
winget export
andwinget import
commands. The current thinking is that we would not implementwinget export
in a PowerShell cmdlet as it is implemented today in the CLI. We have been considering other cmdlets for that scenario. Maybe something like:We're also considering making the current packages.json schema format deprecated in favor of the WinGet Configuration schema format. A new cmdlet like:
The
Import-WinGetPackage*Foo*
cmdlet would accept either the packages.json or the WinGet Configuration to provide the functionality for installing the packages, but not applying other units of configuration in a WinGet Configuration file.We're looking at the issue below to address exporting the current configuration of a device with something like
Export-WinGetConfiguration
. TheInvoke-WinGetConfiguration
andStart-WinGetConfiguration
cmdlets are used to apply the desired state specified in a WinGet Configuration file to the device.Proposed technical implementation details
No response
The text was updated successfully, but these errors were encountered: