Skip to content

Commit 56031b2

Browse files
Update Sources/Commands/SwiftTestTool.swift
Co-authored-by: Max Desiatov <[email protected]>
1 parent ee37cd3 commit 56031b2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Sources/Commands/SwiftTestTool.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,8 @@ public struct SwiftTestTool: SwiftCommand {
195195

196196
// validate XCTest available on darwin based systems
197197
let toolchain = try swiftTool.getTargetToolchain()
198-
if try (toolchain.targetTriple.isDarwin() && toolchain.xctestPath == nil) || !swiftTool.getHostToolchain().swiftSDK.supportsTesting {
198+
let isHostTestingAvailable = try swiftTool.getHostToolchain().swiftSDK.supportsTesting
199+
if (toolchain.targetTriple.isDarwin() && toolchain.xctestPath == nil) || !isHostTestingAvailable {
199200
throw TestError.xctestNotAvailable
200201
}
201202
} catch {

0 commit comments

Comments
 (0)