fix: make sure browser fetcher in launchers uses configuration (#9493)

Issue #9470
This commit is contained in:
Alex Rudenko 2023-01-11 21:09:56 +01:00 committed by GitHub
parent 38b6b79196
commit df554397b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 4 deletions

View File

@ -4,7 +4,6 @@ import path from 'path';
import {Browser} from '../api/Browser.js';
import {CDPBrowser} from '../common/Browser.js';
import {assert} from '../util/assert.js';
import {BrowserFetcher} from './BrowserFetcher.js';
import {BrowserRunner} from './BrowserRunner.js';
import {
BrowserLaunchArgumentOptions,
@ -189,7 +188,7 @@ export class FirefoxLauncher extends ProductLauncher {
override executablePath(): string {
// replace 'latest' placeholder with actual downloaded revision
if (this.puppeteer.browserRevision === 'latest') {
const browserFetcher = new BrowserFetcher({
const browserFetcher = this.puppeteer.createBrowserFetcher({
product: this.product,
path: this.puppeteer.defaultDownloadPath!,
});

View File

@ -18,7 +18,6 @@ import os, {tmpdir} from 'os';
import {join} from 'path';
import {Browser} from '../api/Browser.js';
import {Product} from '../common/Product.js';
import {BrowserFetcher} from './BrowserFetcher.js';
import {
BrowserLaunchArgumentOptions,
ChromeReleaseChannel,
@ -100,7 +99,7 @@ export class ProductLauncher {
return ubuntuChromiumPath;
}
const browserFetcher = new BrowserFetcher({
const browserFetcher = this.puppeteer.createBrowserFetcher({
product: this.product,
path: this.puppeteer.defaultDownloadPath!,
});