From e4f75f47ec2a34709865dc920801ccd809cada5c Mon Sep 17 00:00:00 2001 From: Ben Hardill Date: Tue, 23 Jul 2024 16:58:09 +0100 Subject: [PATCH 1/2] Add HOME env var fixes #298 --- lib/launcher.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/launcher.js b/lib/launcher.js index 99011d5..382bea6 100644 --- a/lib/launcher.js +++ b/lib/launcher.js @@ -429,6 +429,9 @@ class Launcher { // must always include the PATH so npm works env.PATH = process.env.PATH + // should set HOME env var + env.HOME = process.env.HOME + // Use local timezone if set, else use one from snapshot settings // this will be ignored on Windows as it does not use the TZ env var env.TZ = process.env.TZ ? process.env.TZ : this.settings?.settings?.timeZone From 417434288f8934cf7331d9936660aa7bffad4574 Mon Sep 17 00:00:00 2001 From: Ben Hardill Date: Tue, 23 Jul 2024 17:02:17 +0100 Subject: [PATCH 2/2] Fix for Windows --- lib/launcher.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/launcher.js b/lib/launcher.js index 382bea6..3c73f65 100644 --- a/lib/launcher.js +++ b/lib/launcher.js @@ -430,7 +430,11 @@ class Launcher { env.PATH = process.env.PATH // should set HOME env var - env.HOME = process.env.HOME + if (process.platform === 'win32') { + env.UserProfile = process.env.UserProfile + } else { + env.HOME = process.env.HOME + } // Use local timezone if set, else use one from snapshot settings // this will be ignored on Windows as it does not use the TZ env var