softprops / atty

are you or are you not a tty?
MIT License
271 stars 48 forks source link

Make Windows msys detection more robust #56

Closed ChrisDenton closed 1 year ago

ChrisDenton commented 1 year ago

This helps to avoid false positives from file paths that just so happen to include the magic strings.

It's done by detecting if the file is actually a pipe and that it starts with "msys-" or "cygwin-" (rather than being substrings anywhere in the file path). Tested on msys and git bash.