Skip to content

Commit

Permalink
if only 1 result, may contain newline
Browse files Browse the repository at this point in the history
  • Loading branch information
divinity76 authored Jan 11, 2024
1 parent 382a008 commit 4ab2526
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/AutoDiscover.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function guessChromeBinaryPath(): string
case 'Windows':
return self::getFromRegistry() ?? '%ProgramFiles(x86)%\Google\Chrome\Application\chrome.exe';
default:
return \explode("\n", (string) self::shellExec("bash -c 'command -v google-chrome chrome chromium-browser chromium'"), 2)[0] ?: 'chrome';
return rtrim(\explode("\n", (string) self::shellExec("bash -c 'command -v google-chrome chrome chromium-browser chromium'"), 2)[0] ?: 'chrome');
}
}

Expand Down

0 comments on commit 4ab2526

Please sign in to comment.