Skip to content

Commit 33c343b

Browse files
committed
refactor: reject child process commands on error
1 parent 893e5b4 commit 33c343b

File tree

4 files changed

+4
-0
lines changed

4 files changed

+4
-0
lines changed

src/assets_dev_server.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ export class AssetsDevServer {
128128
*/
129129
this.#devServer = run(this.#cwd, {
130130
script: this.#options.cmd,
131+
reject: true,
131132

132133
/**
133134
* We do not inherit the stdio for vite and encore, because in

src/bundler.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ export class Bundler {
113113
this.#logger.info('compiling frontend assets', { suffix: assetsBundler.cmd })
114114
await run(this.#cwd, {
115115
stdio: 'inherit',
116+
reject: true,
116117
script: assetsBundler.cmd,
117118
scriptArgs: assetsBundler.args,
118119
})

src/dev_server.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ export class DevServer {
174174
script: this.#scriptFile,
175175
env: { PORT: port, ...this.#options.env },
176176
nodeArgs: this.#options.nodeArgs,
177+
reject: true,
177178
scriptArgs: this.#options.scriptArgs,
178179
})
179180

src/test_runner.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ export class TestRunner {
228228

229229
this.#testScript = runNode(this.#cwd, {
230230
script: this.#scriptFile,
231+
reject: true,
231232
env: { PORT: port, ...this.#options.env },
232233
nodeArgs: this.#options.nodeArgs,
233234
scriptArgs,

0 commit comments

Comments
 (0)