diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2015-12-01 01:06:10 -0700 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2015-12-01 01:06:10 -0700 |
| commit | 29f24e3c5066e7cb28876d40a811a4a64f9d4b33 (patch) | |
| tree | 01d27aa3253da35af6fe8a5d3f69cffab08773bd /src/errmsg.cpp | |
| parent | 257cf09472ce5f4a51bf39808e119717fa0e4280 (diff) | |
| download | zig-29f24e3c5066e7cb28876d40a811a4a64f9d4b33.tar.gz zig-29f24e3c5066e7cb28876d40a811a4a64f9d4b33.zip | |
add --color cli arg to override tty detection
Diffstat (limited to 'src/errmsg.cpp')
| -rw-r--r-- | src/errmsg.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/errmsg.cpp b/src/errmsg.cpp index 36d203a48f..00557e0214 100644 --- a/src/errmsg.cpp +++ b/src/errmsg.cpp @@ -8,8 +8,8 @@ #define GREEN "\x1b[32;1m" #define RESET "\x1b[0m" -void print_err_msg(ErrorMsg *err) { - if (os_stderr_tty()) { +void print_err_msg(ErrorMsg *err, ErrColor color) { + if (color == ErrColorOn || (color == ErrColorAuto && os_stderr_tty())) { fprintf(stderr, WHITE "%s:%d:%d: " RED "error:" WHITE " %s" RESET "\n", buf_ptr(err->path), err->line_start + 1, err->column_start + 1, |
