mirror of
https://github.com/atom/atom.git
synced 2026-01-24 22:38:20 -05:00
Inherit environment variables in the test runner window
This commit is contained in:
@@ -24,9 +24,13 @@ module.exports = ({blobStore}) ->
|
||||
ApplicationDelegate = require '../src/application-delegate'
|
||||
Clipboard = require '../src/clipboard'
|
||||
TextEditor = require '../src/text-editor'
|
||||
{updateProcessEnv} = require('./update-process-env')
|
||||
require './electron-shims'
|
||||
|
||||
{testRunnerPath, legacyTestRunnerPath, headless, logFile, testPaths} = getWindowLoadSettings()
|
||||
ipcRenderer.on 'environment', (event, env) ->
|
||||
updateProcessEnv(env)
|
||||
|
||||
{testRunnerPath, legacyTestRunnerPath, headless, logFile, testPaths, env} = getWindowLoadSettings()
|
||||
|
||||
unless headless
|
||||
# Show window synchronously so a focusout doesn't fire on input elements
|
||||
@@ -59,6 +63,8 @@ module.exports = ({blobStore}) ->
|
||||
require('module').globalPaths.push(exportsPath)
|
||||
process.env.NODE_PATH = exportsPath # Set NODE_PATH env variable since tasks may need it.
|
||||
|
||||
updateProcessEnv(env)
|
||||
|
||||
# Set up optional transpilation for packages under test if any
|
||||
FindParentDir = require 'find-parent-dir'
|
||||
if packageRoot = FindParentDir.sync(testPaths[0], 'package.json')
|
||||
|
||||
Reference in New Issue
Block a user