Skip to content

Commit

Permalink
Fix passing in a null router to the command string
Browse files Browse the repository at this point in the history
  • Loading branch information
WyattCast44 committed Jul 17, 2022
1 parent e3f497c commit af450af
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,19 @@ private function findExecutable(): string

private function buildServeCommand(): array
{
return [
$command = [
$this->findExecutable(),
'-S',
$this->configuration['host'].':'.$this->configuration['port'],
'-t',
$this->configuration['root'],
$this->configuration['router'],
];

if($this->configuration['router'] != null) {
array_push($command, $this->configuration['router']);
}

return $command;
}

private function buildPassingEnvVarArray(): array
Expand Down

0 comments on commit af450af

Please sign in to comment.