chore: filter out env in debug log (#11386)

This commit is contained in:
Alex Rudenko 2023-11-14 11:19:01 +01:00 committed by GitHub
parent 635305d48b
commit 8f48334014
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -180,9 +180,19 @@ export class Process {
dumpio: opts.dumpio, dumpio: opts.dumpio,
}); });
const env = opts.env || {};
debugLaunch(`Launching ${this.#executablePath} ${this.#args.join(' ')}`, { debugLaunch(`Launching ${this.#executablePath} ${this.#args.join(' ')}`, {
detached: opts.detached, detached: opts.detached,
env: opts.env, env: Object.keys(env).reduce<Record<string, string | undefined>>(
(res, key) => {
if (key.toLowerCase().startsWith('puppeteer_')) {
res[key] = env[key];
}
return res;
},
{}
),
stdio, stdio,
}); });
@ -191,7 +201,7 @@ export class Process {
this.#args, this.#args,
{ {
detached: opts.detached, detached: opts.detached,
env: opts.env, env,
stdio, stdio,
} }
); );