diff --git a/code/ServerFactory.php b/code/ServerFactory.php index 25137b4..d6eb845 100644 --- a/code/ServerFactory.php +++ b/code/ServerFactory.php @@ -46,10 +46,13 @@ public function launchServer($options) $port = PortChecker::findNextAvailablePort($host, $options['preferredPort']); $base = __DIR__; - $command = "exec " . escapeshellcmd($bin) . + $command = escapeshellcmd($bin) . ' -S ' . escapeshellarg($host . ':' . $port) . ' -t ' . escapeshellarg($this->path) . ' ' . escapeshellarg($base . '/server-handler.php'); + if(\DIRECTORY_SEPARATOR !== '\\') { + $command = "exec "; + } if (!empty($options['bootstrapFile'])) { $command = "SERVE_BOOTSTRAP_FILE=" . escapeshellarg($options['bootstrapFile']) . " $command";