Description: In JX build 0.0.3, when executing commands in the Windows Command Prompt (CMD), the output displays incorrectly. Specifically, it includes additional unwanted characters and sequences (likely ANSI escape codes) related to the color library. This problem is not present when running the same commands in Windows PowerShell, where the output displays as expected.
See the comparison between PowerShell and CMD in the attached screenshot.
Steps to Reproduce:
Open Windows Command Prompt.
Run any JX command, such as:
echo '{"foo": 0}' | out/jx 'x'
Observe the output formatting in the CMD window.
Run the same command in Windows PowerShell:
echo '{"foo": 0}' | out/jx 'x'
Compare the results between PowerShell and CMD.
Expected Behavior:
The output in both CMD and PowerShell should render clean, readable JSON without extra characters or escape sequences.
Actual Behavior:
In CMD, the output contains unwanted color escape codes, making it unreadable.
In PowerShell, the output displays correctly with proper formatting.
Example:
In CMD, the output appears as:
[1m{[94m"foo"[0m:0[33m[0m}[0m
In PowerShell, the expected output is:
{
"foo": 0
}
Additional Information:
JX Build: 0.0.3
Operating System: Windows 11 Pro
Terminals Tested:
CMD: Output is malformed.
PowerShell: Output is correct.
Attachments:
Screenshot showing the comparison between CMD and PowerShell output.
This is a good solution for us because colorable is able to do the required fix-ups for Windows without requiring cgo, which keeps cross-compilation simple.
Description: In JX build 0.0.3, when executing commands in the Windows Command Prompt (CMD), the output displays incorrectly. Specifically, it includes additional unwanted characters and sequences (likely ANSI escape codes) related to the color library. This problem is not present when running the same commands in Windows PowerShell, where the output displays as expected.
See the comparison between PowerShell and CMD in the attached screenshot.
Steps to Reproduce:
echo '{"foo": 0}' | out/jx 'x'
echo '{"foo": 0}' | out/jx 'x'
Expected Behavior:
The output in both CMD and PowerShell should render clean, readable JSON without extra characters or escape sequences.
Actual Behavior:
In CMD, the output contains unwanted color escape codes, making it unreadable. In PowerShell, the output displays correctly with proper formatting.
Example: In CMD, the output appears as:
[1m{[94m"foo"[0m:0[33m[0m}[0m
In PowerShell, the expected output is:Additional Information: JX Build: 0.0.3 Operating System: Windows 11 Pro Terminals Tested: CMD: Output is malformed. PowerShell: Output is correct.
Attachments:
Screenshot showing the comparison between CMD and PowerShell output.