mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-04-27 19:09:47 +03:00
std: update tty config references in the build system
This commit is contained in:
+6
-6
@@ -53,18 +53,18 @@ pub const Color = enum {
|
||||
/// Assume stderr is a terminal.
|
||||
on,
|
||||
|
||||
pub fn getTtyConf(color: Color, detected: Io.tty.Config) Io.tty.Config {
|
||||
pub fn getTtyConf(color: Color, detected: Io.File.Writer.Mode) Io.File.Writer.Mode {
|
||||
return switch (color) {
|
||||
.auto => detected,
|
||||
.on => .escape_codes,
|
||||
.off => .no_color,
|
||||
.on => .terminal_escaped,
|
||||
.off => .streaming,
|
||||
};
|
||||
}
|
||||
pub fn detectTtyConf(color: Color, io: Io) Io.tty.Config {
|
||||
pub fn detectTtyConf(color: Color, io: Io) Io.File.Writer.Mode {
|
||||
return switch (color) {
|
||||
.auto => .detect(io, .stderr()),
|
||||
.on => .escape_codes,
|
||||
.off => .no_color,
|
||||
.on => .terminal_escaped,
|
||||
.off => .streaming,
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user