Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: allow to customize tmpdir #7243

Merged
merged 23 commits into from Sep 23, 2021
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/node/Launcher.ts
Expand Up @@ -73,12 +73,13 @@ class ChromeLauncher implements ProductLauncher {
handleSIGHUP = true,
ignoreHTTPSErrors = false,
defaultViewport = { width: 800, height: 600 },
tmpdir = os.tmpdir,
slowMo = 0,
timeout = 30000,
waitForInitialPage = true,
} = options;

const profilePath = path.join(os.tmpdir(), 'puppeteer_dev_chrome_profile-');
const profilePath = path.join(tmpdir(), 'puppeteer_dev_chrome_profile-');
const chromeArguments = [];
if (!ignoreDefaultArgs) chromeArguments.push(...this.defaultArgs(options));
else if (Array.isArray(ignoreDefaultArgs))
Expand Down Expand Up @@ -369,7 +370,7 @@ class FirefoxLauncher implements ProductLauncher {

async _createProfile(extraPrefs: { [x: string]: unknown }): Promise<string> {
const profilePath = await mkdtempAsync(
path.join(os.tmpdir(), 'puppeteer_dev_firefox_profile-')
path.join(tmpdir(), 'puppeteer_dev_firefox_profile-')
);
const prefsJS = [];
const userJS = [];
Expand Down