INNER CODE UNIT · Swift
exec
apple/swift-argument-parser · Plugins/GenerateCommon/PackagePlugin+Helpers.swift:48
func exec(arguments: [String]) throws {
do {
let process = Process()
process.executableURL = self
process.arguments = arguments
try process.run()
process.waitUntilExit()
guard
process.terminationReason == .exit,
process.terminationStatus == 0
else {
throw GeneratePluginError.subprocessFailedNonZeroExit(
self, process.terminationStatus)
}
} catch {
throw GeneratePluginError.subprocessFailedError(self, error)
}
}