Skip to content

Commit

Permalink
Catch ARM in Docker failures
Browse files Browse the repository at this point in the history
  • Loading branch information
soulgalore committed Oct 19, 2024
1 parent 383ccb4 commit 5ee0cdd
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5ee0cdd

Please sign in to comment.