Skip to content

Commit f6992e0

Browse files
authored
fix(e2e): fallback for binaries that don't have --versions support yet (#7110)
fallback for binaries that don't have --versions support yet
1 parent 369ef5e commit f6992e0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/compass-e2e-tests/helpers/compass.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,11 @@ function execFileIgnoreError(
475475

476476
async function getChromiumVersionFromBinary(path: string) {
477477
const { stdout } = await execFileIgnoreError(path, ['--versions'], {});
478-
return JSON.parse(stdout).chrome;
478+
try {
479+
return JSON.parse(stdout).chrome;
480+
} catch {
481+
return MONOREPO_ELECTRON_CHROMIUM_VERSION;
482+
}
479483
}
480484

481485
export async function runCompassOnce(args: string[], timeout = 30_000) {

0 commit comments

Comments
 (0)