From 0a999bf0a6c5b2e4420ca413d6521998ed96adcc Mon Sep 17 00:00:00 2001 From: Dmitry Gozman Date: Wed, 13 Jan 2021 19:21:30 -0800 Subject: [PATCH] fix(driver): remove path trickery from install command (#5008) --- src/cli/driver.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/cli/driver.ts b/src/cli/driver.ts index bfb9626735..c56d514897 100644 --- a/src/cli/driver.ts +++ b/src/cli/driver.ts @@ -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); }