Pass $PATH by command line

This commit is contained in:
Cheng Zhao
2014-11-05 12:11:42 +08:00
parent ddd4a9a968
commit 6a58f6054a
2 changed files with 5 additions and 1 deletions

View File

@@ -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 http://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()