From 1e401665843a8970261aeb4d32b64f70d7b9a6b8 Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Mon, 22 Jun 2020 11:23:37 -0400 Subject: [PATCH] fix precedence of union of env objects Signed-off-by: Sebastian Malton --- src/main/shell-sync.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/shell-sync.ts b/src/main/shell-sync.ts index 5a44f4b362..4d165a1b1a 100644 --- a/src/main/shell-sync.ts +++ b/src/main/shell-sync.ts @@ -27,8 +27,9 @@ export function shellSync(locale: string) { process.env["PATH"] = env.PATH } + // The spread operator allows joining of objects. The precidence is last to first. process.env = { + ...env, ...process.env, - ...env }; }