mirror of
https://github.com/atom/atom.git
synced 2026-01-23 05:48:10 -05:00
Use executed-from argument when path is missing
This still allows atom to open its own source when run from Xcode but will now use the current working directory when launched from the command line with no path argument. Closes #139
This commit is contained in:
@@ -87,9 +87,13 @@
|
||||
NSString *path = [NSString stringWithUTF8String:cleanArgv[0]];
|
||||
path = [self standardizePathToOpen:path withArguments:arguments];
|
||||
[arguments setObject:path forKey:@"path"];
|
||||
} else {
|
||||
NSString *executedFromPath = [arguments objectForKey:@"executed-from"];
|
||||
if (executedFromPath) {
|
||||
[arguments setObject:executedFromPath forKey:@"path"];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return arguments;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user