use color codes only when printing to the terminal
This commit is contained in:
parent
ac1fbbbd66
commit
772112df89
1 changed files with 1 additions and 1 deletions
|
@ -49,7 +49,7 @@
|
|||
var _c = func nil;
|
||||
|
||||
var color = func(enabled) {
|
||||
if (enabled)
|
||||
if (enabled and getprop("/sim/startup/stderr-to-terminal"))
|
||||
_c = func(color, s) { "\x1b[" ~ color ~ "m" ~ s ~ "\x1b[m" }
|
||||
else
|
||||
_c = func(dummy, s) { s }
|
||||
|
|
Loading…
Add table
Reference in a new issue