Skip to content

Commit efdccc8

Browse files
theoludwigmarco-ippolito
authored andcommitted
watch: preserve output when gracefully restarted
PR-URL: #54323 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Moshe Atlow <[email protected]>
1 parent 1a0d8ef commit efdccc8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/internal/main/watch_mode.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,10 @@ function reportGracefulTermination() {
109109
return () => {
110110
clearTimeout(graceTimer);
111111
if (reported) {
112-
process.stdout.write(`${clear}${green}Gracefully restarted ${kCommandStr}${white}\n`);
112+
if (!kPreserveOutput) {
113+
process.stdout.write(clear);
114+
}
115+
process.stdout.write(`${green}Gracefully restarted ${kCommandStr}${white}\n`);
113116
}
114117
};
115118
}

0 commit comments

Comments
 (0)