Skip to content

Commit

Permalink
Fix position of environment at command
Browse files Browse the repository at this point in the history
Signed-off-by: Vitor Mattos <[email protected]>
  • Loading branch information
vitormattos committed Dec 10, 2023
1 parent 2b399be commit 6e02def
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/RunServerListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,14 @@ public function start(): void

$cmd = 'php -S ' . self::$host .':' . self::$port . ' -t ' . $script;

if ($this->workers > 0) {
$cmd = 'PHP_CLI_SERVER_WORKERS=' . $this->workers . ' ' . $cmd;
}

if ($this->runAs && get_current_user() !== $this->runAs) {
$cmd = 'runuser -u ' . $this->runAs . ' -- ' . $cmd;
}

if ($this->workers > 0) {
$cmd = 'PHP_CLI_SERVER_WORKERS=' . $this->workers . ' ' . $cmd;
}

if (is_numeric($this->verbose)) {
$verbose = '';
} else {
Expand Down

0 comments on commit 6e02def

Please sign in to comment.