Make updateProcessEnv asynchronous

Signed-off-by: Nathan Sobo <nathan@github.com>
This commit is contained in:
Antonio Scandurra
2016-11-11 18:39:18 +01:00
committed by Nathan Sobo
parent 31eb91c0a7
commit e34bc188d0
4 changed files with 61 additions and 49 deletions

View File

@@ -675,7 +675,8 @@ class AtomEnvironment extends Model
# Call this method when establishing a real application window.
startEditorWindow: ->
@unloaded = false
@loadState().then (state) =>
updateProcessEnvPromise = updateProcessEnv(@getLoadSettings().env)
loadStatePromise = @loadState().then (state) =>
@windowDimensions = state?.windowDimensions
@displayWindow().then =>
@commandInstaller.installAtomCommand false, (error) ->
@@ -716,6 +717,8 @@ class AtomEnvironment extends Model
@openInitialEmptyEditorIfNecessary()
Promise.all([loadStatePromise, updateProcessEnvPromise])
serialize: (options) ->
version: @constructor.version
project: @project.serialize(options)