Skip to content

Commit

Permalink
Use the correct Atom executable paths on the beta channel
Browse files Browse the repository at this point in the history
Signed-off-by: Nathan Sobo <[email protected]>
  • Loading branch information
Antonio Scandurra authored and Nathan Sobo committed Aug 30, 2016
1 parent 387a817 commit ce24a2f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
4 changes: 3 additions & 1 deletion atom.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,10 @@ fi
if [ $OS == 'Mac' ]; then
if [ -n "$BETA_VERSION" ]; then
ATOM_APP_NAME="Atom Beta.app"
ATOM_EXECUTABLE_NAME="Atom Beta"
else
ATOM_APP_NAME="Atom.app"
ATOM_EXECUTABLE_NAME="Atom"
fi

if [ -z "${ATOM_PATH}" ]; then
Expand All @@ -78,7 +80,7 @@ if [ $OS == 'Mac' ]; then
fi

if [ $EXPECT_OUTPUT ]; then
"$ATOM_PATH/$ATOM_APP_NAME/Contents/MacOS/Atom" --executed-from="$(pwd)" --pid=$$ "$@"
"$ATOM_PATH/$ATOM_APP_NAME/Contents/MacOS/$ATOM_EXECUTABLE_NAME" --executed-from="$(pwd)" --pid=$$ "$@"
exit $?
else
open -a "$ATOM_PATH/$ATOM_APP_NAME" -n --args --executed-from="$(pwd)" --pid=$$ --path-environment="$PATH" "$@"
Expand Down
11 changes: 2 additions & 9 deletions src/buffered-node-process.coffee
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
BufferedProcess = require './buffered-process'
electron = require 'electron'
path = require 'path'

# Extended: Like {BufferedProcess}, but accepts a Node script as the command
Expand Down Expand Up @@ -36,14 +37,6 @@ class BufferedNodeProcess extends BufferedProcess
# * `exit` The callback {Function} which receives a single argument
# containing the exit status (optional).
constructor: ({command, args, options, stdout, stderr, exit}) ->
node =
if process.platform is 'darwin'
# Use a helper to prevent an icon from appearing on the Dock
path.resolve(process.resourcesPath, '..', 'Frameworks',
'Atom Helper.app', 'Contents', 'MacOS', 'Atom Helper')
else
process.execPath

options ?= {}
options.env ?= Object.create(process.env)
options.env['ELECTRON_RUN_AS_NODE'] = 1
Expand All @@ -53,4 +46,4 @@ class BufferedNodeProcess extends BufferedProcess
args.unshift(command)
args.unshift('--no-deprecation')

super({command: node, args, options, stdout, stderr, exit})
super({command: process.execPath, args, options, stdout, stderr, exit})

0 comments on commit ce24a2f

Please sign in to comment.