Skip to content

Commit f6dceb1

Browse files
committed
fix: inconsistent child process commands
1 parent fbf840a commit f6dceb1

File tree

2 files changed

+11
-14
lines changed

2 files changed

+11
-14
lines changed

src/HttpServer/index.ts

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -51,19 +51,16 @@ export class HttpServer extends Emittery {
5151

5252
this.logger.info(this.childProcess ? 're-starting http server...' : 'starting http server...')
5353

54-
this.childProcess = execa(
55-
process.execPath,
56-
['-r', '@adonisjs/assembler/build/register'].concat(this.nodeArgs).concat([this.sourceFile]),
57-
{
58-
buffer: false,
59-
stdio: 'inherit',
60-
cwd: this.projectRoot,
61-
env: {
62-
FORCE_COLOR: 'true',
63-
...this.env,
64-
},
65-
}
66-
)
54+
this.childProcess = execa.node(this.sourceFile, [], {
55+
buffer: false,
56+
stdio: 'inherit',
57+
cwd: this.projectRoot,
58+
env: {
59+
FORCE_COLOR: 'true',
60+
...this.env,
61+
},
62+
nodeOptions: ['-r', '@adonisjs/assembler/build/register'].concat(this.nodeArgs),
63+
})
6764

6865
/**
6966
* Notify about server events

src/Manifest/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export class Manifest {
4949
*/
5050
public async generate(): Promise<boolean> {
5151
try {
52-
const response = await execa('node', ['ace', 'generate:manifest'], {
52+
const response = await execa(process.execPath, ['ace', 'generate:manifest'], {
5353
buffer: true,
5454
cwd: this.appRoot,
5555
env: {

0 commit comments

Comments
 (0)