Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions check-result
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// Copyright (c) 2024 BB9z, MIT License

import Foundation
import FoundationXML

func printUsage() {
let name = CommandLine.arguments.first ?? "check-result"
Expand Down Expand Up @@ -223,17 +224,17 @@ class CheckResult {
}

let tempFile = URL(fileURLWithPath: NSTemporaryDirectory()).appendingPathComponent("\(UUID().uuidString).json")
FileManager.default.createFile(atPath: tempFile.path, contents: nil)
_ = FileManager.default.createFile(atPath: tempFile.path, contents: nil)
defer {
try? FileManager.default.removeItem(at: tempFile)
}
let fileHandle = try FileHandle(forWritingTo: tempFile)

let task = Process()
task.launchPath = "/usr/bin/xcrun"
task.executableURL = URL(fileURLWithPath: "/usr/bin/xcrun")
task.arguments = arguments
task.standardOutput = fileHandle
task.launch()
try task.run()
task.waitUntilExit()
try? fileHandle.close()
if task.terminationStatus != 0 {
Expand Down
Empty file modified tests/test_check_result.sh
100644 → 100755
Empty file.