You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
No colors when hooks are run by a git commit #1381
colors on windows are a bit fiddly and unfortunately there isn't much we can do to change them when run from git -- we try and call SetConsoleModehere but if that fails you don't get colors
actually hmm, on windows sys.stdout.isatty() is false, but sys.stderr.isatty() is true -- which is different than linux, maybe if we use stderr instead of stdout?
When I run sys.std---.isatty() on my windows maschine both are false when run from pycharm python console. But both are true when run from the terminal regardless if via invoking a python console first or by running python -c.
Activity
asottile commentedon Apr 2, 2020
colors on windows are a bit fiddly and unfortunately there isn't much we can do to change them when run from
git-- we try and callSetConsoleModehere but if that fails you don't get colorsCielquan commentedon Apr 2, 2020
Ok thanks for the fast answer.
Then I have to live with it :(
asottile commentedon Apr 2, 2020
actually hmm, on windows
sys.stdout.isatty()is false, butsys.stderr.isatty()is true -- which is different than linux, maybe if we use stderr instead of stdout?Cielquan commentedon Apr 2, 2020
When I run
sys.std---.isatty()on my windows maschine both arefalsewhen run from pycharm python console. But both aretruewhen run from the terminal regardless if via invoking a python console first or by runningpython -c.asottile commentedon Apr 2, 2020
can you try the patch in #1382?
Cielquan commentedon Apr 2, 2020
Sure let me try .. may take a bit.
Cielquan commentedon Apr 2, 2020
It does work 👍