Skip to content

Commit

Permalink
CR
Browse files Browse the repository at this point in the history
  • Loading branch information
MoLow committed Mar 7, 2024
1 parent 8095f10 commit 897f07c
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions lib/internal/main/watch_mode.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,14 @@ let restarting = false;
async function restart() {
if (restarting) return;
restarting = true;
if (!kPreserveOutput) process.stdout.write(clear);
process.stdout.write(`${green}Restarting ${kCommandStr}${white}\n`);
await stop();
start();
restarting = false;
try {
if (!kPreserveOutput) process.stdout.write(clear);
process.stdout.write(`${green}Restarting ${kCommandStr}${white}\n`);
await stop();
start();
} finally {
restarting = false;
}
}

emitExperimentalWarning('Watch mode');
Expand Down

0 comments on commit 897f07c

Please sign in to comment.