| ... | @@ -177,7 +177,17 @@ pub const File = struct { | ... | @@ -177,7 +177,17 @@ pub const File = struct { |
| 177 | if (windows.is_the_target) { | 177 | if (windows.is_the_target) { |
| 178 | return os.isCygwinPty(self.handle); | 178 | return os.isCygwinPty(self.handle); |
| 179 | } | 179 | } |
| 180 | return self.isTty(); | 180 | if (self.isTty()) { |
| | 181 | if (self.handle == os.STDOUT_FILENO or self.handle == os.STDERR_FILENO) { |
| | 182 | // Use getenvC to workaround https://github.com/ziglang/zig/issues/3511 |
| | 183 | if (os.getenvC(c"TERM")) |term| { |
| | 184 | if (std.mem.eql(u8, term, "dumb")) |
| | 185 | return false; |
| | 186 | } |
| | 187 | } |
| | 188 | return true; |
| | 189 | } |
| | 190 | return false; |
| 181 | } | 191 | } |
| 182 | | 192 | |
| 183 | pub const SeekError = os.SeekError; | 193 | pub const SeekError = os.SeekError; |