Skip to content

Commit

Permalink
[8.x] Fixes installing ChromeDriver 127 and above. (#1110)
Browse files Browse the repository at this point in the history
fixes #1109

Signed-off-by: Mior Muhammad Zaki <[email protected]>
  • Loading branch information
crynobone authored Jul 24, 2024
1 parent 5c72910 commit c7c1702
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Console/ChromeDriverCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,13 @@ protected function extract($version, $archive)

$zip->extractTo($this->directory);

$binary = $zip->getNameIndex(version_compare($version, '115.0', '<') ? 0 : 1);
$index = match (true) {
version_compare($version, '115.0', '<') => 0,
version_compare($version, '127.0', '<') => 1,
default => 2,
};

$binary = $zip->getNameIndex($index);

$zip->close();

Expand Down

0 comments on commit c7c1702

Please sign in to comment.