mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 10:43:21 +02:00
Use old API to launch tasks on all versions of macOS
This commit is contained in:
parent
4f6e2c85f9
commit
9ae67c15b2
1 changed files with 8 additions and 18 deletions
|
@ -23,24 +23,14 @@
|
||||||
|
|
||||||
NSLog(@"calling interface at %@", self->pathTo);
|
NSLog(@"calling interface at %@", self->pathTo);
|
||||||
|
|
||||||
if (@available(macOS 10.13, *)) {
|
NSError *error = nil;
|
||||||
NSError *error = nil;
|
[interface launch];
|
||||||
if (![interface launchAndReturnError:&error]) {
|
[interface waitUntilExit];
|
||||||
*outError = [NSError errorWithDomain:@"interface"
|
if (0 != [interface terminationStatus]) {
|
||||||
code:-1
|
*outError = [NSError errorWithDomain:@"interface"
|
||||||
userInfo:@{NSUnderlyingErrorKey: error}];
|
code:-1
|
||||||
return 0;
|
userInfo:@{NSUnderlyingErrorKey: error}];
|
||||||
}
|
return 0;
|
||||||
} else {
|
|
||||||
NSError *error = nil;
|
|
||||||
[interface launch];
|
|
||||||
[interface waitUntilExit];
|
|
||||||
if (0 != [interface terminationStatus]) {
|
|
||||||
*outError = [NSError errorWithDomain:@"interface"
|
|
||||||
code:-1
|
|
||||||
userInfo:@{NSUnderlyingErrorKey: error}];
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NSFileHandle * fh = [standardOut fileHandleForReading];
|
NSFileHandle * fh = [standardOut fileHandleForReading];
|
||||||
|
|
Loading…
Reference in a new issue