mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Allow ATOM_HOME to be reassigned if the new value is valid
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
/** @babel */
|
||||
|
||||
import fs from 'fs'
|
||||
import {spawnSync} from 'child_process'
|
||||
|
||||
const ENVIRONMENT_VARIABLES_TO_PRESERVE = new Set([
|
||||
@@ -37,6 +38,10 @@ function updateProcessEnv (launchEnv) {
|
||||
process.env[key] = envToAssign[key]
|
||||
}
|
||||
}
|
||||
|
||||
if (envToAssign.ATOM_HOME && fs.existsSync(envToAssign.ATOM_HOME)) {
|
||||
process.env.ATOM_HOME = envToAssign.ATOM_HOME
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user