fix: trim non-live test setup work

This commit is contained in:
Shakker
2026-04-01 14:45:54 +01:00
committed by Peter Steinberger
parent 33e6a6724d
commit d6ad92c1a0

View File

@@ -355,7 +355,8 @@ export function installTestEnv(options?: { loadProfileEnv?: boolean }): {
const realHome = process.env.HOME ?? os.homedir();
const liveEnvSnapshot = { ...process.env };
if (options?.loadProfileEnv ?? live) {
const shouldLoadProfileEnv = options?.loadProfileEnv ?? (live || allowRealHome);
if (shouldLoadProfileEnv) {
loadProfileEnv(realHome);
}