Skip to content

Instantly share code, notes, and snippets.

@hax
Created July 7, 2017 13:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hax/fff487df4b7a0fda1c9a8f997e72d6d2 to your computer and use it in GitHub Desktop.
Save hax/fff487df4b7a0fda1c9a8f997e72d6d2 to your computer and use it in GitHub Desktop.
// See https://github.com/nodejs/node/issues/6456
import {platform} from 'os'
import {satisfies} from 'semver'
if (platform() === 'darwin' && satisfies(process.version, '>=6.0.0 <6.2.1')) {
for (const s of [process.stdout, process.stderr]) {
if (s && s.isTTY && s._handle && typeof s._handle.setBlocking === 'function') {
s._handle.setBlocking(true)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment