mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-15 14:11:50 +03:00
fix(driver): remove path trickery from install command (#5008)
This commit is contained in:
parent
e3ebba5573
commit
0a999bf0a6
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user