Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

♻ Adjust how the browser download script determines executable path #150

Merged
merged 1 commit into from
Jan 26, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions packages/core/src/utils/install-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ export default async function install({
extract = (i, o) => require('extract-zip')(i, { dir: o }),
// default exectuable location within the extracted archive
executable = {
linux: 'chrome',
win64: 'chrome.exe',
win32: 'chrome.exe',
darwin: path.join('Chromium.app', 'Contents', 'MacOS', 'Chromium')
linux: path.join('chrome-linux', 'chrome'),
win64: path.join('chrome-win', 'chrome.exe'),
win32: path.join('chrome-win32', 'chrome.exe'),
darwin: path.join('chrome-mac', 'Chromium.app', 'Contents', 'MacOS', 'Chromium')
}[platform]
} = {}) {
let outdir = path.join(directory, revision);
let dlpath = path.join(outdir, decodeURIComponent(url.split('/').pop()));
let exec = path.join(outdir, path.parse(dlpath).name, executable);
let exec = path.join(outdir, executable);

if (!existsSync(exec)) {
// always log this for progress bar context
Expand Down