mirror of
https://github.com/ziglang/zig.git
synced 2026-11-22 04:37:39 -05:00
add --color cli arg to override tty detection
This commit is contained in:
1 parent
257cf09472
commit
29f24e3c50
9 files changed
+43
-11
No files matched your search
+2
-2
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user