Skip to content

Commit 9fd80b0

Browse files
Copilotdonatj
andcommitted
Fix Windows CI: remove shell redirection when using proc_open descriptors
Co-authored-by: donatj <133747+donatj@users.noreply.github.com>
1 parent c91407e commit 9fd80b0

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/MockWebServer.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,18 +63,12 @@ public function start() : void {
6363

6464
$script = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'server' . DIRECTORY_SEPARATOR . 'server.php';
6565

66-
$stdout = tempnam(sys_get_temp_dir(), 'mockserv-stdout-');
67-
$cmd = sprintf("php -S %s:%d %s", $this->host, $this->port, escapeshellarg($script));
68-
69-
$fullCmd = sprintf('%s > %s 2>&1',
70-
$cmd,
71-
$stdout
72-
);
66+
$cmd = sprintf("php -S %s:%d %s", $this->host, $this->port, escapeshellarg($script));
7367

7468
InternalServer::incrementRequestCounter($this->tmpDir, 0);
7569

7670
$env = [ self::TMP_ENV => $this->tmpDir ];
77-
$this->process = $this->startServer($fullCmd, $env);
71+
$this->process = $this->startServer($cmd, $env);
7872

7973
for( $i = 0; $i <= 20; $i++ ) {
8074
usleep(100000);

0 commit comments

Comments
 (0)