You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add flag to disable terminal clear in --watch mode #45713
Currently --watchclears the terminal every time it restarts the process. This can hide vital information that the process logs on shutdown or from other processes running in the same terminal.
What is the feature you are proposing to solve the problem?
Remove the terminal clearing because it is opinionated. If this is not desired, make it opt-out via a flag like TypeScript's preserveWatchOutput or the nodemon solution.
What alternatives have you considered?
nodemon also does not clear terminal on restart, so it is an alternative.
Thanks, updated issue title and I also investigated nodemon, they default to not clearing but there are various supported ways to achieve clearing. I think it should be definitely made configurable because user preferences vary.
hello, how taking a stab at the issue, how do I whitelist a command/flag
I am getting this error message out/Release/node: bad option: --dont-clear-on-restart any pointers would be very much appreciated
Is clearing the terminal really a good default choice? Doesn't that potentially take away error messages etc., depending on the terminal host? What if stdout is not a TTY?
Reacted by Debadree Chatterjee, Yahor Siarheyenka, Cameron Tacklind, Mikael Finstad and Blake Williams
Activity
MoLow commentedon Dec 2, 2022
sounds like a flag/config that can be added 👍🏻
[-]`--watch` should not clear terminal[/-][+]Add flag to disable terminal clear in `--watch` mode[/+]silverwind commentedon Dec 2, 2022
Thanks, updated issue title and I also investigated nodemon, they default to not clearing but there are various supported ways to achieve clearing. I think it should be definitely made configurable because user preferences vary.
debadree25 commentedon Dec 2, 2022
hello, how taking a stab at the issue, how do I whitelist a command/flag
I am getting this error message
out/Release/node: bad option: --dont-clear-on-restartany pointers would be very much appreciatedThank you!
cc @MoLow
debadree25 commentedon Dec 2, 2022
Ok was able to figure out have started a draft PR, attempting to add tests
tniessen commentedon Dec 2, 2022
Quoting myself from #45717:
watch: add CLI flag to preserve output
watch: add CLI flag to preserve output
watch: add CLI flag to preserve output
watch: add CLI flag to preserve output