Skip to content

Instantly share code, notes, and snippets.

@shakahl
Created March 4, 2024 12:51
Show Gist options
  • Save shakahl/2324d53c91d23d6dbd1a7604522b2d5e to your computer and use it in GitHub Desktop.
Save shakahl/2324d53c91d23d6dbd1a7604522b2d5e to your computer and use it in GitHub Desktop.
NodeJS - workaround for tty output truncation upon process.exit() call #nodejs #node #javascript #workaround #hack #tty
// workaround for tty output truncation upon process.exit()
// https://github.com/nodejs/node/issues/6456
[process.stdout, process.stderr].forEach((s) => {
s && s.isTTY && s._handle && s._handle.setBlocking &&
s._handle.setBlocking(true)
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment