diff --git a/lib/internal/main/watch_mode.js b/lib/internal/main/watch_mode.js index d70908e6e3c..fb07f8a642d 100644 --- a/lib/internal/main/watch_mode.js +++ b/lib/internal/main/watch_mode.js @@ -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`); } }; }