mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
chore: filter out env in debug log (#11386)
This commit is contained in:
parent
635305d48b
commit
8f48334014
@ -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,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user