Skip to content

Commit f25c9d7

Browse files
committed
Still show the commit hash even if the library version isn't known
1 parent 5a1fc12 commit f25c9d7

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Sources/Testing/Support/Versions.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,7 @@ let simulatorVersion: String = {
130130
///
131131
/// This value is not part of the public interface of the testing library.
132132
let testingLibraryVersion: String = {
133-
guard var result = swt_getTestingLibraryVersion().flatMap(String.init(validatingCString:)) else {
134-
return "unknown"
135-
}
133+
var result = swt_getTestingLibraryVersion().flatMap(String.init(validatingCString:)) ?? "unknown"
136134

137135
// Get details of the git commit used when compiling the testing library.
138136
var commitHash: UnsafePointer<CChar>?

0 commit comments

Comments
 (0)