pingbird / puro

A powerful tool for installing and upgrading Flutter versions.
https://puro.dev
Other
236 stars 10 forks source link

'puro ls' defaults to --no-color in git bash #53

Closed tksoh closed 1 year ago

tksoh commented 1 year ago

Something strange with puro running in Git Bash on Windows 11. In VSCode terminal, puro ls always show its output in colors. But in git bash, it does not show the colors by default, and I have to add the --color option to force it to show the colors. What am I missing?

Screenshot of git bash for references.

Screenshot 2023-09-27 161356

pingbird commented 1 year ago

It uses Stdout.supportsAnsiEscapes to detect whether or not the current shell supports colors, but not all shells are supported.

I was able to reproduce it locally and it looks like a known issue in Dart: https://github.com/dart-lang/sdk/issues/31606

pingbird commented 1 year ago

This should be fixed in the next release (puro now just manually checks the TERM variable)