Skip to content

Commit

Permalink
Pass $PATH by command line
Browse files Browse the repository at this point in the history
  • Loading branch information
zcbenz committed Nov 5, 2014
1 parent ddd4a9a commit 6a58f60
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion atom.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ if [ $OS == 'Mac' ]; then
"$ATOM_PATH/$ATOM_APP_NAME/Contents/MacOS/Atom" --executed-from="$(pwd)" --pid=$$ "$@"
exit $?
else
open -a "$ATOM_PATH/$ATOM_APP_NAME" -n --args --executed-from="$(pwd)" --pid=$$ "$@"
open -a "$ATOM_PATH/$ATOM_APP_NAME" -n --args --executed-from="$(pwd)" --pid=$$ --path-environment="$PATH" "$@"
fi
elif [ $OS == 'Linux' ]; then
SCRIPT=$(readlink -f "$0")
Expand Down
4 changes: 4 additions & 0 deletions src/browser/main.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ parseCommandLine = ->
unless fs.statSyncNoException(resourcePath)
resourcePath = path.dirname(path.dirname(__dirname))

# On Yosemite the $PATH is not inherited by the "open" command, so we have to
# explicitly pass it by command line, see https://git.io/YC8_Ew.
process.env.PATH = args['path-environment'] if args['path-environment']

{resourcePath, pathsToOpen, executedFrom, test, version, pidToKillWhenClosed, devMode, safeMode, newWindow, specDirectory, logFile}

start()

0 comments on commit 6a58f60

Please sign in to comment.