Skip to content

Commit c7c1702

Browse files
authored
[8.x] Fixes installing ChromeDriver 127 and above. (#1110)
fixes #1109 Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
1 parent 5c72910 commit c7c1702

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/Console/ChromeDriverCommand.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,13 @@ protected function extract($version, $archive)
225225

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

228-
$binary = $zip->getNameIndex(version_compare($version, '115.0', '<') ? 0 : 1);
228+
$index = match (true) {
229+
version_compare($version, '115.0', '<') => 0,
230+
version_compare($version, '127.0', '<') => 1,
231+
default => 2,
232+
};
233+
234+
$binary = $zip->getNameIndex($index);
229235

230236
$zip->close();
231237

0 commit comments

Comments
 (0)