microsoft / msstore-cli

Microsoft Store CLI
MIT License
82 stars 9 forks source link

Clean JSON output #15

Open zooba opened 1 year ago

zooba commented 1 year ago

Currently the stdout from the process is mixed between messages and JSON, which means you can't do commands like this (in Powershell):

$p = ConvertFrom-Json (msstore submission get $product_id)

(Adding -v, which I prefer to do in CI builds, only makes it worse.)

Ideally, messages would be sent to stderr and only JSON to stdout, or alternatively have a mode that only sends JSON unless an error occurs.

azchohfi commented 1 year ago

This is something we've struggled and decided against when we started the project, but it is something we could change. I'm investigating and it seems quite straightforward. A lot of changes since we would need to move away from assuming everything is out on StdOut, but doable.