Avatar
omochimetaru 6/5/2024 12:55 PM
ん〜なんか変だ
12:55 PM
let process = try swiftRunProcess( ["carton", "dev", "--verbose", "--port", "8080", "--skip-auto-open"], packageDirectory: packageDirectory.asURL ) ↑このxctestの中で立ち上げた swift run プロセスの出力が xctest の出力に出てこない
12:56 PM
func swiftRunProcess( _ arguments: [String], packageDirectory: URL ) throws -> SwiftRunProcess { let swiftBin = try findSwiftExecutable().pathString var outputBuffer = Array<UInt8>() let process = CartonHelpers.Process( arguments: [swiftBin, "run"] + arguments, workingDirectory: try AbsolutePath(validating: packageDirectory.path), outputRedirection: .stream( stdout: { (chunk) in outputBuffer += chunk stdoutStream.write(sequence: chunk) }, stderr: { (chunk) in stderrStream.write(sequence: chunk) }, redirectStderr: false ) )
12:56 PM
これで書き込めてるはずなのに・・・
12:58 PM
flushしたら出てきた