mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00: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[]) {
|
export async function installBrowsers(browserNames?: BrowserName[]) {
|
||||||
let browsersJsonDir = path.dirname(process.execPath);
|
const browsersJsonDir = path.join(__dirname, '..', '..');
|
||||||
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);
|
|
||||||
}
|
|
||||||
await installBrowsersWithProgressBar(browsersJsonDir, browserNames);
|
await installBrowsersWithProgressBar(browsersJsonDir, browserNames);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user