fix(driver): remove path trickery from install command (#5008)

This commit is contained in:
Dmitry Gozman 2021-01-13 19:21:30 -08:00 committed by GitHub
parent e3ebba5573
commit 0a999bf0a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -61,11 +61,6 @@ export function runServer() {
}
export async function installBrowsers(browserNames?: BrowserName[]) {
let browsersJsonDir = path.dirname(process.execPath);
if (!fs.existsSync(path.join(browsersJsonDir, 'browsers.json'))) {
browsersJsonDir = path.join(__dirname, '..', '..');
if (!fs.existsSync(path.join(browsersJsonDir, 'browsers.json')))
throw new Error('Failed to find browsers.json in ' + browsersJsonDir);
}
const browsersJsonDir = path.join(__dirname, '..', '..');
await installBrowsersWithProgressBar(browsersJsonDir, browserNames);
}