From 5ee0cdd27968f0e92a3a34338728946b5218065a Mon Sep 17 00:00:00 2001 From: soulgalore Date: Sat, 19 Oct 2024 23:28:53 +0200 Subject: [PATCH] Catch ARM in Docker failures --- index.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index d264de9..9a7cafb 100644 --- a/index.js +++ b/index.js @@ -16,9 +16,14 @@ module.exports = { (os.platform() === 'linux' && os.arch() === 'arm64') ) { // Special handling for making it easy on Raspberry Pis - const potentialGeckodriverPath = execSync('which geckodriver'); - if (potentialGeckodriverPath !== undefined) { - return potentialGeckodriverPath.toString().trim(); + try { + const potentialGeckodriverPath = execSync('which geckodriver'); + if (potentialGeckodriverPath !== undefined) { + return potentialGeckodriverPath.toString().trim(); + } + } catch (e) { + // Catch running inside of Docker on ARM + return driverPath; } } else { return driverPath;