mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-26 11:45:08 +00:00
Use newer syntax for autorelease pool
This commit is contained in:
parent
466806fb11
commit
9fd6b5e1e2
1 changed files with 7 additions and 6 deletions
|
@ -84,14 +84,15 @@ static void launch_fish_with_applescript(NSString *fish_binary_path)
|
||||||
|
|
||||||
/* This approach asks Terminal to open a script that we control */
|
/* This approach asks Terminal to open a script that we control */
|
||||||
int main(void) {
|
int main(void) {
|
||||||
[[NSAutoreleasePool alloc] init];
|
|
||||||
|
|
||||||
/* Get the fish executable. Make sure it's absolute. */
|
@autoreleasepool {
|
||||||
NSURL *fish_executable = [[NSBundle mainBundle] URLForResource:@"fish" withExtension:@"" subdirectory:@"base/bin"];
|
/* Get the fish executable. Make sure it's absolute. */
|
||||||
if (! fish_executable)
|
NSURL *fish_executable = [[NSBundle mainBundle] URLForResource:@"fish" withExtension:@"" subdirectory:@"base/bin"];
|
||||||
die("Could not find fish executable in bundle");
|
if (! fish_executable)
|
||||||
|
die("Could not find fish executable in bundle");
|
||||||
|
|
||||||
launch_fish_with_applescript([fish_executable path]);
|
launch_fish_with_applescript([fish_executable path]);
|
||||||
|
}
|
||||||
|
|
||||||
/* If we succeeded, it will clean itself up */
|
/* If we succeeded, it will clean itself up */
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in a new issue