mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-11 15:37:29 +02:00
Give error instead of throw exception if Vim exe is not in app bundle.
git-svn-id: http://macvim.googlecode.com/svn/trunk@153 96c4425d-ca35-0410-94e5-3396d5c13a8f
This commit is contained in:
@@ -154,6 +154,7 @@
|
||||
[alert runModal];
|
||||
[alert release];
|
||||
|
||||
[NSApp replyToOpenOrPrint:NSApplicationDelegateReplyFailure];
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -162,6 +163,11 @@
|
||||
|
||||
NSString *path = [[NSBundle mainBundle]
|
||||
pathForAuxiliaryExecutable:@"Vim"];
|
||||
if (!path) {
|
||||
NSLog(@"ERROR: Vim executable could not be found inside app bundle!");
|
||||
[NSApp replyToOpenOrPrint:NSApplicationDelegateReplyFailure];
|
||||
return;
|
||||
}
|
||||
|
||||
[NSTask launchedTaskWithLaunchPath:path arguments:args];
|
||||
|
||||
@@ -287,6 +293,11 @@
|
||||
NSMutableArray *args = [NSMutableArray arrayWithObject:@"-g"];
|
||||
NSString *path = [[NSBundle mainBundle]
|
||||
pathForAuxiliaryExecutable:@"Vim"];
|
||||
if (!path) {
|
||||
NSLog(@"ERROR: Vim executable could not be found inside app bundle!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//NSLog(@"Launching a new VimTask...");
|
||||
[NSTask launchedTaskWithLaunchPath:path arguments:args];
|
||||
|
||||
Reference in New Issue
Block a user