made colored output more consistent (#1706)

* made colored output more consistent
* added os.supportsAnsiEscapeCodes
This commit is contained in:
emekoi
2018-11-07 23:36:36 -06:00
committed by Andrew Kelley
parent ac8898e681
commit 8e69a18d8c
4 changed files with 69 additions and 36 deletions

View File

@@ -1128,9 +1128,6 @@ Error os_get_cwd(Buf *out_cwd) {
#define is_wprefix(s, prefix) \
(wcsncmp((s), (prefix), sizeof(prefix) / sizeof(WCHAR) - 1) == 0)
static bool is_stderr_cyg_pty(void) {
#if defined(__MINGW32__)
return false;
#else
HANDLE stderr_handle = GetStdHandle(STD_ERROR_HANDLE);
if (stderr_handle == INVALID_HANDLE_VALUE)
return false;
@@ -1182,7 +1179,6 @@ static bool is_stderr_cyg_pty(void) {
}
free(nameinfo);
return (p != NULL);
#endif
}
#endif