Open RichiCoder1 opened 4 years ago
Modern Windows command line apps are in powershell, and already output structured objects. These can already be converted to JSON, Excel, CSV, or whatever other format is preferred.
The issue is that winget is unique, in that it doesn't output any structured data. #196 was created to address this issue but it was closed.
@mikemaccana As mentioned on the other two issues, PowerShell isn't available in all Windows SKUs which this is targeting. For native PowerShell support, you're looking for https://github.com/microsoft/winget-cli/issues/221.
@RichiCoder1 Could you list all target SKUs and/or a link to the requirements spec, please?
It's been mentioned multiple times across multiple sources:
@RichiCoder1 I'm going through the backlog as a part of our planning exercise for the next few milestones. I'm going to close this as a Duplicate of #221.
@RichiCoder1 we've identified this Issue as a duplicate of another one that already exists. This specific instance is being closed in favor of tracking the concern over on the referenced Issue. Thanks for your report! Be sure to add your π to the other issue to help raise the priority.
I'm cool with that as long as the ultimate functionality is still flexible enough to be consumed from other tools
Yes, that is the intent. Rather than building some kind of --output-JSON
flag, the native PowerShell implementation will provide objects that may be used, and will not have the truncated output string behavior currently exhibited in the winget.exe client.
Woo native powershell implementation! Thatβs exactly what I personally wanted.
@denelon PowerShell isn't the only Windows shell. For example, I also use nushell, some users use git bash, and some users still use the command prompt.
I strongly hope to implement the json output parameter (like --output-JSON
).
You can turn output from any powershell command into JSON by piping to convertto-JSON
I think It feels very wasteful to call powershel.exe or pwsh.exe every time I use winget on non-PowerShell shell.
I'm going to re-open this issue. It's not high-priority (unless we see a lot of π) since we have the option in PowerShell, but I can see value in what is being asked for.
We still have more work to completely move everything the CLI is calling into the COM APIs, and once that's done, providing some kind of output type/format "should" be a bit easier to implement.
I'm going to re-open this issue. It's not high-priority (unless we see a lot of π) since we have the option in PowerShell, but I can see value in what is being asked for.
We still have more work to completely move everything the CLI is calling into the COM APIs, and once that's done, providing some kind of output type/format "should" be a bit easier to implement.
I'd like to note one thing in reference to powershell. Until the winget powershell module can be used in system context there is a gap in functionality that could be filled if winget output could be json formatted. That would make converting winget output to a powershell object very easy.
Description of the new feature/enhancement
To enable automation and consumption via other tools, it'd be great if current and future commands supported a JSON output mode.