Skip to content

Commit

Permalink
watch: preserve output when gracefully restarted
Browse files Browse the repository at this point in the history
PR-URL: #54323
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
  • Loading branch information
theoludwig authored and marco-ippolito committed Nov 16, 2024
1 parent 42eb1d6 commit d164bd0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/internal/main/watch_mode.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,10 @@ function reportGracefulTermination() {
return () => {
clearTimeout(graceTimer);
if (reported) {
process.stdout.write(`${clear}${green}Gracefully restarted ${kCommandStr}${white}\n`);
if (!kPreserveOutput) {
process.stdout.write(clear);
}
process.stdout.write(`${green}Gracefully restarted ${kCommandStr}${white}\n`);
}
};
}
Expand Down

0 comments on commit d164bd0

Please sign in to comment.