We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
onSuccess
1 parent cd03e1e commit 314a6d7Copy full SHA for 314a6d7
src/index.ts
@@ -353,14 +353,11 @@ export async function build(_options: Options) {
353
onSuccessProcess = exec(options.onSuccess, [], {
354
nodeOptions: { shell: true, stdio: 'inherit' },
355
})
356
-
357
- await onSuccessProcess
358
- if (
359
- onSuccessProcess.exitCode &&
360
- onSuccessProcess.exitCode !== 0
361
- ) {
362
- process.exitCode = onSuccessProcess.exitCode
363
- }
+ onSuccessProcess.process?.on('exit', (code) => {
+ if (code && code !== 0) {
+ process.exitCode = code
+ }
+ })
364
}
365
366
0 commit comments