Skip to content

Commit

Permalink
refactor: reject child process commands on error
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Sep 3, 2024
1 parent 893e5b4 commit 33c343b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/assets_dev_server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ export class AssetsDevServer {
*/
this.#devServer = run(this.#cwd, {
script: this.#options.cmd,
reject: true,

/**
* We do not inherit the stdio for vite and encore, because in
Expand Down
1 change: 1 addition & 0 deletions src/bundler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ export class Bundler {
this.#logger.info('compiling frontend assets', { suffix: assetsBundler.cmd })
await run(this.#cwd, {
stdio: 'inherit',
reject: true,
script: assetsBundler.cmd,
scriptArgs: assetsBundler.args,
})
Expand Down
1 change: 1 addition & 0 deletions src/dev_server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ export class DevServer {
script: this.#scriptFile,
env: { PORT: port, ...this.#options.env },
nodeArgs: this.#options.nodeArgs,
reject: true,
scriptArgs: this.#options.scriptArgs,
})

Expand Down
1 change: 1 addition & 0 deletions src/test_runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ export class TestRunner {

this.#testScript = runNode(this.#cwd, {
script: this.#scriptFile,
reject: true,
env: { PORT: port, ...this.#options.env },
nodeArgs: this.#options.nodeArgs,
scriptArgs,
Expand Down

0 comments on commit 33c343b

Please sign in to comment.