watch: preserve output when gracefully restarted

PR-URL: https://github.com/nodejs/node/pull/54323
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
This commit is contained in:
Théo LUDWIG authored and Marco Ippolito committed 2024-11-17 11:51:42 +01:00
1 parent 1a0d8ef64f
commit efdccc88a2
1 file changed
+4 -1
+4 -1
View File
@@ -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`);
}
};
}