Skip to content

Commit

Permalink
tty: fix console printing on Windows
Browse files Browse the repository at this point in the history
This broke writing non-ASCII data to the console on Windows because
the result would be codepage-dependent.

This partially reverts 8b751f7.

Fixes: #18189
Refs: #18019

PR-URL: #18214
Fixes: #18189
Refs: #18019
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
  • Loading branch information
addaleax authored and MylesBorins committed Aug 17, 2018
1 parent 7d4d96b commit 9fdba04
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions lib/tty.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
const { inherits, _extend } = require('util');
const net = require('net');
const { TTY, isTTY } = process.binding('tty_wrap');
const { makeSyncWrite } = require('internal/net');
const errors = require('internal/errors');
const readline = require('readline');

Expand Down Expand Up @@ -78,8 +77,6 @@ function WriteStream(fd) {
// even though it was originally intended to change in v1.0.2 (Libuv 1.2.1).
// Ref: https://github.com/nodejs/node/pull/1771#issuecomment-119351671
this._handle.setBlocking(true);
this._writev = null;
this._write = makeSyncWrite(fd);

var winSize = new Array(2);
var err = this._handle.getWindowSize(winSize);
Expand Down

0 comments on commit 9fdba04

Please sign in to comment.