mirror of
https://github.com/odin-lang/Odin.git
synced 2026-02-12 22:33:36 +00:00
fix not printing Error: when terminal has no color support
This commit is contained in:
@@ -390,8 +390,6 @@ gb_internal void error_va(TokenPos const &pos, TokenPos end, char const *fmt, va
|
||||
error_out_empty();
|
||||
} else {
|
||||
error_out_pos(pos);
|
||||
}
|
||||
if (has_ansi_terminal_colours()) {
|
||||
error_out_coloured("Error: ", TerminalStyle_Normal, TerminalColour_Red);
|
||||
}
|
||||
error_out_va(fmt, va);
|
||||
@@ -427,8 +425,8 @@ gb_internal void warning_va(TokenPos const &pos, TokenPos end, char const *fmt,
|
||||
error_out_empty();
|
||||
} else {
|
||||
error_out_pos(pos);
|
||||
error_out_coloured("Warning: ", TerminalStyle_Normal, TerminalColour_Yellow);
|
||||
}
|
||||
error_out_coloured("Warning: ", TerminalStyle_Normal, TerminalColour_Yellow);
|
||||
error_out_va(fmt, va);
|
||||
error_out("\n");
|
||||
show_error_on_line(pos, end);
|
||||
@@ -841,4 +839,4 @@ gb_internal void print_all_errors(void) {
|
||||
gb_file_write(f, res, gb_string_length(res));
|
||||
|
||||
errors_already_printed = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user