From ed744c12a9d9d0a7945504f07919216b5f5346a0 Mon Sep 17 00:00:00 2001 From: Lee Dohm Date: Mon, 14 Mar 2016 08:43:16 -0700 Subject: [PATCH] Move location of call to environmentHelpers.normalize --- src/atom-environment.coffee | 2 -- src/initialize-application-window.coffee | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/atom-environment.coffee b/src/atom-environment.coffee index a173443ce..8c79d66f6 100644 --- a/src/atom-environment.coffee +++ b/src/atom-environment.coffee @@ -4,7 +4,6 @@ path = require 'path' _ = require 'underscore-plus' {deprecate} = require 'grim' -environmentHelpers = require('./environment-helpers') {CompositeDisposable, Disposable, Emitter} = require 'event-kit' fs = require 'fs-plus' {mapSourcePosition} = require 'source-map-support' @@ -128,7 +127,6 @@ class AtomEnvironment extends Model # Call .loadOrCreate instead constructor: (params={}) -> - environmentHelpers.normalize(params) {@blobStore, @applicationDelegate, @window, @document, configDirPath, @enablePersistence, onlyLoadBaseStyleSheets} = params @unloaded = false diff --git a/src/initialize-application-window.coffee b/src/initialize-application-window.coffee index 10f321ded..ea811f515 100644 --- a/src/initialize-application-window.coffee +++ b/src/initialize-application-window.coffee @@ -1,11 +1,15 @@ # Like sands through the hourglass, so are the days of our lives. module.exports = ({blobStore}) -> + environmentHelpers = require('./environment-helpers') path = require 'path' require './window' {getWindowLoadSettings} = require './window-load-settings-helpers' {resourcePath, isSpec, devMode, env} = getWindowLoadSettings() + # Set baseline environment + environmentHelpers.normalize({env: env}) + # Add application-specific exports to module search path. exportsPath = path.join(resourcePath, 'exports') require('module').globalPaths.push(exportsPath)