diff --git a/lib/internal/main/watch_mode.js b/lib/internal/main/watch_mode.js index 9be47ed114a..2fb689bd7d5 100644 --- a/lib/internal/main/watch_mode.js +++ b/lib/internal/main/watch_mode.js @@ -113,7 +113,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`); } }; }