Skip to content

Commit

Permalink
Skip Nodemon (SIGINT) exit or aborted task errors
Browse files Browse the repository at this point in the history
The previous commit lets Gulp hande `new PluginError()` versus logging to console, so we now need to skip typical “watch + restart” errors seen during development
  • Loading branch information
colinrotherham committed Sep 21, 2023
1 parent 0032c33 commit 089b280
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions shared/tasks/npm.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ export async function run(name, args = [], options) {
throw new Error(`Task '${name}' not found in '${pkgPath}'`)
}
} catch (cause) {
// Skip Nodemon (SIGINT) exit or aborted task error codes
// https://github.com/open-cli-tools/concurrently/pull/359/files
if (cause.signal === 'SIGINT' || [130, 3221225786].includes(cause.code)) {
return
}

throw new PluginError(`npm run ${name}`, cause, {
// Hide error properties already formatted by npm
showProperties: false
Expand Down

0 comments on commit 089b280

Please sign in to comment.