Skip to content

Commit c726185

Browse files
authored
[7.x] Normalize directory separator on ChromeDriverCommand (#1045)
fixes #1044 Signed-off-by: Mior Muhammad Zaki <[email protected]>
1 parent 85e562b commit c726185

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/Console/ChromeDriverCommand.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,10 @@ protected function extract($version, $archive)
235235
*/
236236
protected function rename($binary, $os)
237237
{
238-
$newName = Str::contains($binary, DIRECTORY_SEPARATOR)
239-
? Str::after(str_replace('chromedriver', 'chromedriver-'.$os, $binary), DIRECTORY_SEPARATOR)
238+
$binary = str_replace(DIRECTORY_SEPARATOR, '/', $binary);
239+
240+
$newName = Str::contains($binary, '/')
241+
? Str::after(str_replace('chromedriver', 'chromedriver-'.$os, $binary), '/')
240242
: str_replace('chromedriver', 'chromedriver-'.$os, $binary);
241243

242244
rename($this->directory.$binary, $this->directory.$newName);

testbench.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
providers:
2+
- Laravel\Dusk\DuskServiceProvider

0 commit comments

Comments
 (0)