mirror of
https://github.com/munki/munki.git
synced 2026-01-06 06:29:56 -06:00
Address unhandled objc error when runCLIAsync can't launch a script due to a missing script interpreter
This commit is contained in:
@@ -368,7 +368,9 @@ class AsyncProcessRunner {
|
||||
}
|
||||
|
||||
func cancel() {
|
||||
task.terminate()
|
||||
if task.isRunning {
|
||||
task.terminate()
|
||||
}
|
||||
}
|
||||
|
||||
func run() async {
|
||||
@@ -378,7 +380,7 @@ class AsyncProcessRunner {
|
||||
} catch {
|
||||
// task didn't start
|
||||
results.failureDetail.append("error running \(task.executableURL?.path ?? "")")
|
||||
results.failureDetail.append(error.localizedDescription)
|
||||
results.failureDetail.append(": \(error.localizedDescription)")
|
||||
results.exitcode = -1
|
||||
status.phase = .ended
|
||||
delegate?.processUpdated()
|
||||
|
||||
Reference in New Issue
Block a user