always default to windows-ansi on windows. minor refactor.
This commit is contained in:
parent
a14650860d
commit
b5026af628
|
@ -11,7 +11,9 @@
|
|||
var EventEmitter = require('events').EventEmitter
|
||||
, StringDecoder = require('string_decoder').StringDecoder
|
||||
, util = require('util')
|
||||
, Tput = require('./tput')
|
||||
, fs = require('fs');
|
||||
|
||||
var Tput = require('./tput')
|
||||
, colors = require('./colors')
|
||||
, slice = Array.prototype.slice;
|
||||
|
||||
|
@ -41,7 +43,7 @@ function Program(options) {
|
|||
|
||||
options.log = options.log || options.dump;
|
||||
if (options.log) {
|
||||
this._logger = require('fs').createWriteStream(options.log);
|
||||
this._logger = fs.createWriteStream(options.log);
|
||||
if (options.dump) this.setupDump();
|
||||
}
|
||||
|
||||
|
@ -62,7 +64,7 @@ function Program(options) {
|
|||
this.terminal = options.term
|
||||
|| options.terminal
|
||||
|| process.env.TERM
|
||||
|| 'xterm';
|
||||
|| (process.platform === 'win32' ? 'windows-ansi' : 'xterm');
|
||||
|
||||
this._buf = '';
|
||||
this._flush = this.flush.bind(this);
|
||||
|
|
Loading…
Reference in New Issue