mirror of
https://github.com/atom/atom.git
synced 2026-01-25 06:48:28 -05:00
Combine Check
- The additional (!process.env[key] && envToAssign[key]) check allows “preserved” variables to be set for the first time if they are currently unset
This commit is contained in:
@@ -31,12 +31,8 @@ function updateProcessEnv (launchEnv) {
|
||||
}
|
||||
|
||||
for (let key in envToAssign) {
|
||||
if (!ENVIRONMENT_VARIABLES_TO_PRESERVE.has(key)) {
|
||||
if (!ENVIRONMENT_VARIABLES_TO_PRESERVE.has(key) || (!process.env[key] && envToAssign[key])) {
|
||||
process.env[key] = envToAssign[key]
|
||||
} else {
|
||||
if (!process.env[key] && envToAssign[key]) {
|
||||
process.env[key] = envToAssign[key]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user