| author | |
| committer | |
| log | 51ac8eb08e7542c25c7d3a0d1ebeac040544e4c0 |
| tree | e8a5ff930e22a73835eabf415174d927b9bae592 |
| parent | 96e5f476c3f7f44d0b299bc6043f3fd88769bd8b |
2 files changed, 5 insertions(+), 2 deletions(-)
lib/std/debug.zig+2-2| ... | ... | @@ -81,7 +81,7 @@ pub fn getSelfDebugInfo() !*DebugInfo { |
| 81 | 81 | } |
| 82 | 82 | } |
| 83 | 83 | |
| 84 | fn detectTTYConfig() TTY.Config { | |
| 84 | pub fn detectTTYConfig() TTY.Config { | |
| 85 | 85 | var bytes: [128]u8 = undefined; |
| 86 | 86 | const allocator = &std.heap.FixedBufferAllocator.init(bytes[0..]).allocator; |
| 87 | 87 | if (process.getEnvVarOwned(allocator, "ZIG_DEBUG_COLOR")) |_| { |
| ... | ... | @@ -89,7 +89,7 @@ fn detectTTYConfig() TTY.Config { |
| 89 | 89 | } else |_| { |
| 90 | 90 | if (stderr_file.supportsAnsiEscapeCodes()) { |
| 91 | 91 | return .escape_codes; |
| 92 | } else if (builtin.os == .windows) { | |
| 92 | } else if (builtin.os == .windows and stderr_file.isTty()) { | |
| 93 | 93 | return .windows_api; |
| 94 | 94 | } else { |
| 95 | 95 | return .no_color; |
test/tests.zig+3| ... | ... | @@ -622,6 +622,9 @@ pub const StackTracesContext = struct { |
| 622 | 622 | child.stderr_behavior = .Pipe; |
| 623 | 623 | child.env_map = b.env_map; |
| 624 | 624 | |
| 625 | if (b.verbose) { | |
| 626 | printInvocation(args.toSliceConst()); | |
| 627 | } | |
| 625 | 628 | child.spawn() catch |err| debug.panic("Unable to spawn {}: {}\n", .{ full_exe_path, @errorName(err) }); |
| 626 | 629 | |
| 627 | 630 | var stdout = Buffer.initNull(b.allocator); |