Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <[email protected]>
  • Loading branch information
crynobone committed Jun 27, 2024
2 parents 772631c + f6f1a13 commit 34a86e1
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/DuskServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ protected function startServer(): void
{
$this->guardServerStarting();

$this->process = Process::fromShellCommandline(
$this->process = new Process(
command: $this->prepareCommand(),
cwd: join_paths($this->basePath(), 'public'),
env: array_merge(defined_environment_variables(), [
Expand Down Expand Up @@ -224,18 +224,18 @@ protected function guardServerStarting(): void
/**
* Prepare the command for starting the PHP server.
*
* @return string
* @return array
*/
protected function prepareCommand(): string
protected function prepareCommand(): array
{
return sprintf(
((OperatingSystem::onWindows() ? '' : 'exec ').'%s -S %s:%s %s -t %s'),
ProcessUtils::escapeArgument((string) (new PhpExecutableFinder())->find(false)),
$this->host,
$this->port,
ProcessUtils::escapeArgument(join_paths(__DIR__, 'server.php')),
return [
(string) (new PhpExecutableFinder())->find(false),
'-S',
sprintf('%s:%s', $this->host, $this->port),
join_paths(__DIR__, 'server.php'),
'-t',
ProcessUtils::escapeArgument(join_paths($this->basePath(), 'public')),
);
];
}

/**
Expand Down

0 comments on commit 34a86e1

Please sign in to comment.