Skip to content

Commit bc5e668

Browse files
committed
Update the cli documentation format for commands
1 parent 8775ba7 commit bc5e668

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/playground/cli/src/run-cli.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,9 @@ export async function runCLI(args: RunCLIArgs): Promise<RunCLIServer | void> {
619619
logger.setSeverityFilterLevel(severity);
620620
}
621621

622+
const selectedPort =
623+
args.command === 'server' ? (args['port'] as number) ?? 9400 : 0;
624+
622625
// Declare file lock manager outside scope of startServer
623626
// so we can look at it when debugging request handling.
624627
const nativeFlockSync =
@@ -643,7 +646,7 @@ export async function runCLI(args: RunCLIArgs): Promise<RunCLIServer | void> {
643646
logger.log('Starting a PHP server...');
644647

645648
return startServer({
646-
port: args['port'] as number,
649+
port: selectedPort,
647650
onBind: async (server: Server, port: number) => {
648651
const host = '127.0.0.1';
649652
const serverUrl = `http://${host}:${port}`;

0 commit comments

Comments
 (0)