code-server version: 2.preview.2-vsc1.36.1
- OS Version:
Linux 5.2.6-arch1-1-ARCH x86_64
Description
code-server --version errors when used with a pipe.
code-server --version colors output even in pipe.
I'm doing the following to produce what's got output in v1 of code-server:
code-server --version | head -1 | cut -d' ' -f3
But this actually produces Error: Unexpected SIGPIPE; workaround is 2> /dev/null.
In addition, the output contains ANSI color escape, which is undesirable; check it with:
code-server --version 2> /dev/null | head -1 | cut -d' ' -f3 | hexdump -C
Steps to Reproduce
code-server --version | head -1
code-server --version 2> /dev/null | head -1 | cut -d' ' -f3 | hexdump -C