Skip to content

Commit 30008b1

Browse files
committed
fix: split args to be forwaded to child process by space
1 parent 0e53810 commit 30008b1

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

src/AssetsBundler/index.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ export class AssetsBundler extends Emittery {
2121
*/
2222
private binaryName = 'encore'
2323

24+
private encoreArgs: string[] = []
25+
2426
/**
2527
* Options passed to spawn a child process
2628
*/
@@ -38,12 +40,16 @@ export class AssetsBundler extends Emittery {
3840

3941
constructor(
4042
private projectRoot: string,
41-
private encoreArgs: string[] = [],
43+
encoreArgs: string[] = [],
4244
private buildAssets: boolean = true,
4345
private logger: typeof uiLogger,
4446
private env: { [key: string]: string } = {}
4547
) {
4648
super()
49+
this.encoreArgs = encoreArgs.reduce((result, arg) => {
50+
result = result.concat(arg.split(' '))
51+
return result
52+
}, [] as string[])
4753
}
4854

4955
/**

src/HttpServer/index.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,20 @@ import { logger as uiLogger } from '@poppinss/cliui'
1818
*/
1919
export class HttpServer extends Emittery {
2020
private childProcess: execa.ExecaChildProcess
21+
private nodeArgs: string[] = []
2122

2223
constructor(
2324
private sourceFile: string,
2425
private projectRoot: string,
25-
private nodeArgs: string[] = [],
26+
nodeArgs: string[] = [],
2627
private logger: typeof uiLogger,
2728
private env: { [key: string]: string } = {}
2829
) {
2930
super()
31+
this.nodeArgs = nodeArgs.reduce((result, arg) => {
32+
result = result.concat(arg.split(' '))
33+
return result
34+
}, [] as string[])
3035
}
3136

3237
/**

0 commit comments

Comments
 (0)