Direct use of executable URL
This commit is contained in:
Sébastien Stormacq
2024-10-12 00:24:55 +02:00
committed by GitHub
parent e5b120db67
commit fc65c3cc42
+2 -2
View File
@@ -27,7 +27,7 @@ struct Utils {
logLevel: ProcessLogLevel
) throws -> String {
if logLevel >= .debug {
print("\(executable.description) \(arguments.joined(separator: " "))")
print("\(executable.path()) \(arguments.joined(separator: " "))")
}
let fd = dup(1)
@@ -83,7 +83,7 @@ struct Utils {
let process = Process()
process.standardOutput = pipe
process.standardError = pipe
process.executableURL = URL(fileURLWithPath: executable.description)
process.executableURL = executable
process.arguments = arguments
if let workingDirectory = customWorkingDirectory {
process.currentDirectoryURL = URL(fileURLWithPath: workingDirectory.path())