Skip to content

Commit 59b48fe

Browse files
committed
fallback for binaries that don't have --versions support yet
1 parent 6190901 commit 59b48fe

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 (_err: any) {
481+
return MONOREPO_ELECTRON_CHROMIUM_VERSION;
482+
}
479483
}
480484

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

0 commit comments

Comments
 (0)