mirror of
https://github.com/openclaw/openclaw.git
synced 2026-02-19 18:39:20 -05:00
fix(windows): handle undefined environment variables in runCommandWithTimeout
This commit is contained in:
committed by
Peter Steinberger
parent
d7fb01afad
commit
e97aa45428
@@ -100,7 +100,11 @@ export async function runCommandWithTimeout(
|
||||
return false;
|
||||
})();
|
||||
|
||||
const resolvedEnv = env ? { ...process.env, ...env } : { ...process.env };
|
||||
const resolvedEnv = Object.fromEntries(
|
||||
Object.entries({ ...process.env, ...(env ?? {}) })
|
||||
.filter(([, value]) => value !== undefined)
|
||||
.map(([key, value]) => [key, String(value)]),
|
||||
);
|
||||
if (shouldSuppressNpmFund) {
|
||||
if (resolvedEnv.NPM_CONFIG_FUND == null) {
|
||||
resolvedEnv.NPM_CONFIG_FUND = "false";
|
||||
|
||||
Reference in New Issue
Block a user