mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Remove superfluous check on ATOM_HOME
always set at the process level, so always set here
This commit is contained in:
@@ -13,9 +13,6 @@
|
||||
console.error('Unhandled promise rejection %o with error: %o', promise, error)
|
||||
})
|
||||
|
||||
// Ensure ATOM_HOME is always set before anything else is required
|
||||
setupAtomHome()
|
||||
|
||||
// Normalize to make sure drive letter case is consistent on Windows
|
||||
process.resourcesPath = path.normalize(process.resourcesPath)
|
||||
|
||||
@@ -80,24 +77,6 @@
|
||||
require('ipc').sendChannel('window-command', 'window:loaded')
|
||||
}
|
||||
|
||||
function setupAtomHome () {
|
||||
if (!process.env.ATOM_HOME) {
|
||||
var home
|
||||
if (process.platform === 'win32') {
|
||||
home = process.env.USERPROFILE
|
||||
} else {
|
||||
home = process.env.HOME
|
||||
}
|
||||
var atomHome = path.join(home, '.atom')
|
||||
try {
|
||||
atomHome = fs.realpathSync(atomHome)
|
||||
} catch (error) {
|
||||
// Ignore since the path might just not exist yet.
|
||||
}
|
||||
process.env.ATOM_HOME = atomHome
|
||||
}
|
||||
}
|
||||
|
||||
function setupCsonCache (cacheDir) {
|
||||
require('season').setCacheDir(path.join(cacheDir, 'cson'))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user