Skip to content

Commit 613bef4

Browse files
committed
refactor: remove execa.node usages with execa
execa.node behaves more like "child_process.fork" and execa behaves more like "child_process.spawn" and we need the later
1 parent 932a5d9 commit 613bef4

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

src/HttpServer/index.ts

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

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

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

6568
/**
6669
* Notify about server events

src/Manifest/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,8 @@ 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('node', ['ace', 'generate:manifest'], {
5353
buffer: true,
54-
nodeOptions: [],
5554
cwd: this.appRoot,
5655
env: {
5756
FORCE_COLOR: 'true',

0 commit comments

Comments
 (0)