ajalt/mordant

Add file / pipe utility functions to `Win32MppImpls`

sschuberth opened this issue · 1 comments

when (getTermProgram()) { isn't reached even if output is not redirected to a file.

That's correct. Whenever we're in a situation where it's not possible to detect whether output is interactive or not (which is the case for Git for Windows), we should assume it is not, in order to avoid printing ANSI codes to a file.

Git for Windows itself has this detection mechanism

Yeah, that was the workaround I mentioned that we could add to Win32MppImpls in a separate PR.

Originally posted by @ajalt in #127 (comment)

This is a prerequisite to solve #38.