Guard against no LOCALAPPDATA env var

Esse commit está contido em:
Kevin Sawicki
2015-02-03 17:04:30 -08:00
commit 622b396111
+1 -1
Ver Arquivo
@@ -81,7 +81,7 @@ setupAtomHome = ->
# in a non-default location. This enables an easy portable version.
if process.platform is 'win32'
SquirrelUpdate = require './squirrel-update'
if SquirrelUpdate.existsSync()
if SquirrelUpdate.existsSync() and process.env.LOCALAPPDATA
atomPath = path.join(process.env.LOCALAPPDATA, 'atom').toLowerCase()
if __dirname.toLowerCase().indexOf(atomPath) isnt 0
rootAtomFolder = path.resolve(process.execPath, '..', '..')