File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,15 @@ function escapeArg(arg) {
2323 return arg ;
2424}
2525
26+ function buildCommandWithPort ( command , port ) {
27+ if ( ! port ) return command ;
28+
29+ if ( process . platform === 'win32' ) {
30+ return `set PORT=${ port } && ${ command } ` ;
31+ }
32+ return `PORT=${ port } ${ command } ` ;
33+ }
34+
2635const serverCommand = [
2736 `node` ,
2837 inspectorServerPath ,
@@ -34,17 +43,18 @@ const serverCommand = [
3443 . filter ( Boolean )
3544 . join ( " " ) ;
3645
46+ const clientCommand = `node ${ inspectorClientPath } ` ;
3747const CLIENT_PORT = process . env . CLIENT_PORT ?? "" ;
3848const SERVER_PORT = process . env . SERVER_PORT ?? "" ;
3949
4050const { result } = concurrently (
4151 [
4252 {
43- command : `PORT= ${ SERVER_PORT } ${ serverCommand } ` ,
53+ command : buildCommandWithPort ( serverCommand , SERVER_PORT ) ,
4454 name : "server" ,
4555 } ,
4656 {
47- command : `PORT= ${ CLIENT_PORT } node ${ inspectorClientPath } ` ,
57+ command : buildCommandWithPort ( clientCommand , CLIENT_PORT ) ,
4858 name : "client" ,
4959 } ,
5060 ] ,
You can’t perform that action at this time.
0 commit comments