Skip to content

Commit 367e266

Browse files
authored
Merge pull request #2135 from hydephp/fix-serve-command-not-handling-project-path-with-spaces
Fix serve command not handling project path with spaces
2 parents 056486a + 1e6f003 commit 367e266

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/framework/src/Console/Commands/ServeCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function safeHandle(): int
5454
$this->runServerProcess(sprintf('php -S %s:%d %s',
5555
$this->getHostSelection(),
5656
$this->getPortSelection(),
57-
$this->getExecutablePath()
57+
escapeshellarg($this->getExecutablePath()),
5858
));
5959

6060
return Command::SUCCESS;

packages/framework/tests/Feature/Commands/ServeCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,6 @@ public function testWithFancyOutput()
176176

177177
protected function binaryPath(): string
178178
{
179-
return Hyde::path('vendor/hyde/realtime-compiler/bin/server.php');
179+
return escapeshellarg(Hyde::path('vendor/hyde/realtime-compiler/bin/server.php'));
180180
}
181181
}

0 commit comments

Comments
 (0)