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 ) )