mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Merge branch 'master' into api/docs
This commit is contained in:
11
atom.sh
11
atom.sh
@@ -1,5 +1,14 @@
|
||||
#!/bin/sh
|
||||
open -a /Applications/Atom.app -n --args --executed-from="$(pwd)" --pid=$$ $@
|
||||
ATOM_PATH=/Applications/Atom.app
|
||||
|
||||
if [ ! -d $ATOM_PATH ]; then sleep 5; fi # Wait for Atom to reappear, Sparkle may be replacing it.
|
||||
|
||||
if [ ! -d $ATOM_PATH ]; then
|
||||
echo "Atom Application not found at '$ATOM_PATH'" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
open -a $ATOM_PATH -n --args --executed-from="$(pwd)" --pid=$$ $@
|
||||
|
||||
# Used to exit process when atom is used as $EDITOR
|
||||
on_die() {
|
||||
|
||||
@@ -150,6 +150,9 @@
|
||||
for (NSWindow *window in [self windows]) {
|
||||
if (![window isExcludedFromWindowsMenu]) {
|
||||
AtomWindowController *controller = [window windowController];
|
||||
if (!controller.pathToOpen) {
|
||||
continue;
|
||||
}
|
||||
if (!openingDirectory) {
|
||||
BOOL openedPathIsDirectory = false;
|
||||
[[NSFileManager defaultManager] fileExistsAtPath:controller.pathToOpen isDirectory:&openedPathIsDirectory];
|
||||
|
||||
Reference in New Issue
Block a user