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.
1 parent 8095f10 commit 897f07cCopy full SHA for 897f07c
lib/internal/main/watch_mode.js
@@ -107,11 +107,14 @@ let restarting = false;
107
async function restart() {
108
if (restarting) return;
109
restarting = true;
110
- if (!kPreserveOutput) process.stdout.write(clear);
111
- process.stdout.write(`${green}Restarting ${kCommandStr}${white}\n`);
112
- await stop();
113
- start();
114
- restarting = false;
+ try {
+ if (!kPreserveOutput) process.stdout.write(clear);
+ process.stdout.write(`${green}Restarting ${kCommandStr}${white}\n`);
+ await stop();
+ start();
115
+ } finally {
116
+ restarting = false;
117
+ }
118
}
119
120
emitExperimentalWarning('Watch mode');
0 commit comments