Remove available check below macOS 10.15.4

Since the Package.swift declare the minimal target for macOS is 10.15.4,
we can remove the uncessary available check code
This commit is contained in:
Kyle
2021-12-05 17:07:34 +08:00
parent 4d8555d9b0
commit 6d1b09ad5b
6 changed files with 27 additions and 67 deletions

View File

@@ -260,13 +260,7 @@ private func makeJSONRPCBuildServer(client: MessageHandler, serverPath: Absolute
withExtendedLifetime((clientToServer, serverToClient)) {}
}
let process = Foundation.Process()
if #available(OSX 10.13, *) {
process.executableURL = serverPath.asURL
} else {
process.launchPath = serverPath.pathString
}
process.executableURL = serverPath.asURL
process.arguments = serverFlags
process.standardOutput = serverToClient
process.standardInput = clientToServer
@@ -274,12 +268,6 @@ private func makeJSONRPCBuildServer(client: MessageHandler, serverPath: Absolute
log("build server exited: \(process.terminationReason) \(process.terminationStatus)")
connection.close()
}
if #available(OSX 10.13, *) {
try process.run()
} else {
process.launch()
}
try process.run()
return connection
}