diff --git a/packages/js/src/executors/verdaccio/verdaccio.impl.ts b/packages/js/src/executors/verdaccio/verdaccio.impl.ts index 1af6e7887b3dc..bb1f2076fdb95 100644 --- a/packages/js/src/executors/verdaccio/verdaccio.impl.ts +++ b/packages/js/src/executors/verdaccio/verdaccio.impl.ts @@ -49,12 +49,12 @@ export async function verdaccioExecutor( options.location === 'none' ? [] : [setupNpm(options), setupYarn(options)]; const processExitListener = (signal?: number | NodeJS.Signals) => { - if (childProcess) { - childProcess.kill(signal); - } for (const fn of cleanupFunctions) { fn(); } + if (childProcess) { + childProcess.kill(signal); + } }; process.on('exit', processExitListener); process.on('SIGTERM', processExitListener);