Address unhandled objc error when runCLIAsync can't launch a script due to a missing script interpreter

This commit is contained in:
Greg Neagle
2025-08-25 09:29:45 -07:00
parent bb120ec234
commit a49189d39a

View File

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