mirror of
https://github.com/atom/atom.git
synced 2026-01-22 13:28:01 -05:00
If Atom.app doesn't exist, wait 5 seconds and try again.
Closes #351 When Sparkle updates Atom, it deletes the app and replaces it. This causes the `atom` cli to fail when called within this brief time period. This gives `atom` a five second grace period if it is not found.
This commit is contained in:
6
atom.sh
6
atom.sh
@@ -1,5 +1,9 @@
|
||||
#!/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.
|
||||
|
||||
open -a $ATOM_PATH -n --args --executed-from="$(pwd)" --pid=$$ $@
|
||||
|
||||
# Used to exit process when atom is used as $EDITOR
|
||||
on_die() {
|
||||
|
||||
Reference in New Issue
Block a user