Closed xiangkangjw closed 2 years ago
Thank you @xiangkangjw for reporting this issue!
When pretty printing update metadata, the code is directly manipulating the console cursor location in order to indent text. This manipulation is not supported when redirecting to a text file.
The issue is fixed by printing the required number of white spaces in order to maintain indenting. This is compatible with console redirection and should fix this issue.
See commit 542f6c4f1e8a6c40da4f5fdfe99f0c181ae922ac
However, further processing of the pretty printed output might be unwieldy. I also added a "--json-out-path
See commit d124d142f05c2a6590efd1e13d893b95e18d08c5
Please let me know if you still encounter issues.
I have followed the instructions and was able to query results and print in console, however, I wasn't able to store it in a local file, could you please advise?
When I run the command
.\upsync.exe query --store-path .\store --package-type microsoft-update
, it works just fine. However, when I try to pipe it to a result file (.\upsync.exe query --store-path .\store --package-type microsoft-update *> results.txt
), it has an error. I have attached the error message in a file attached in this email.I later found out this might be because the console library is being used in the MicrosoftUpdateMetadata.cs file. I tried to run it in a separate cmd inside Powershell but only generated partial results, I also attached the result in this email.
Do you know how to store the result in a local file? Thank you so much.
error-message.txt partial-result.txt