Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Commit 23f040d

Browse files
support Chromium Browser (#4027)
Relax the browser check to allow for chromium-browser as a direct alternative to google-chrome. Add a fallback for binary name and improve the version match.
1 parent 6e22b45 commit 23f040d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Robo/Commands/Tests/TestsCommandBase.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,10 @@ protected function findChrome() {
135135
return 'google-chrome';
136136
}
137137

138+
if ($this->getInspector()->commandExists('chromium-browser')) {
139+
return 'chromium-browser';
140+
}
141+
138142
$osx_path = "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome";
139143
if (EnvironmentDetector::isDarwin() && file_exists($osx_path)) {
140144
return $osx_path;
@@ -154,7 +158,7 @@ protected function findChrome() {
154158
*/
155159
protected function checkChromeVersion($bin) {
156160
$version = (int) $this->getContainer()->get('executor')
157-
->execute("'$bin' --version | cut -f3 -d' ' | cut -f1 -d'.'")
161+
->execute("'$bin' --version | cut -f1 -d'.' | rev | cut -f1 -d' ' | rev")
158162
->run()
159163
->getMessage();
160164

0 commit comments

Comments
 (0)