diff --git a/src/Robo/Commands/Tests/TestsCommandBase.php b/src/Robo/Commands/Tests/TestsCommandBase.php index 3c2b63155..7f99a01d1 100644 --- a/src/Robo/Commands/Tests/TestsCommandBase.php +++ b/src/Robo/Commands/Tests/TestsCommandBase.php @@ -135,6 +135,10 @@ protected function findChrome() { return 'google-chrome'; } + if ($this->getInspector()->commandExists('chromium-browser')) { + return 'chromium-browser'; + } + $osx_path = "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"; if (EnvironmentDetector::isDarwin() && file_exists($osx_path)) { return $osx_path; @@ -154,7 +158,7 @@ protected function findChrome() { */ protected function checkChromeVersion($bin) { $version = (int) $this->getContainer()->get('executor') - ->execute("'$bin' --version | cut -f3 -d' ' | cut -f1 -d'.'") + ->execute("'$bin' --version | cut -f1 -d'.' | rev | cut -f1 -d' ' | rev") ->run() ->getMessage();