std: update tty config references in the build system

This commit is contained in:
Andrew Kelley
2025-12-10 20:55:11 -08:00
parent 7837d975dc
commit b042e93522
13 changed files with 271 additions and 294 deletions
+6 -6
View File
@@ -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,
};
}
};