Merge pull request #10421 from backstage/rugvip/stop

cli: stop logging stopped watcher
This commit is contained in:
Patrik Oldsberg
2022-03-24 15:06:49 +01:00
committed by GitHub
2 changed files with 6 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/cli': patch
---
Stop logging "Stopped watcher" when shutting down the development backend.
+1 -2
View File
@@ -35,9 +35,8 @@ export async function serveBackend(options: BackendServeOptions) {
const waitForExit = async () => {
for (const signal of ['SIGINT', 'SIGTERM'] as const) {
process.on(signal, () => {
compiler.close(() => console.log('Stopped watcher'));
// exit instead of resolve. The process is shutting down and resolving a promise here logs an error
process.exit();
compiler.close(() => process.exit());
});
}