Skip to content

Commit c70f3d2

Browse files
committed
additional env var to force saying we're in tty
1 parent 6f6c350 commit c70f3d2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Tests/JavaKitTests/BasicRuntimeTests.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import JavaKit
1616
import JavaKitNetwork
1717
import JavaKitVM
1818
import Testing
19+
import Foundation
1920

2021
#if os(Linux)
2122
import Glibc
@@ -94,7 +95,10 @@ var isLinux: Bool {
9495

9596
/// Whether we're running on MacOS in an interactive terminal session.
9697
var isMacOSTerminal: Bool {
97-
isMacOS && isatty(STDOUT_FILENO) == 1
98+
isMacOS && (
99+
isatty(STDOUT_FILENO) == 1 ||
100+
ProcessInfo.processInfo.environment["IS_TTY"] != nil // since 'swift test' still sometimes hides the fact we're in tty
101+
)
98102
}
99103

100104
/// Whether we're running on MacOS.

0 commit comments

Comments
 (0)