[issue #96] Fix bunyan to default to paging by default in node 0.10.0.

This commit is contained in:
Trent Mick 2013-07-02 16:42:22 -07:00
parent d10f9ec53b
commit dceffd7b25
2 changed files with 5 additions and 3 deletions

View file

@ -8,7 +8,9 @@ Known issues:
## bunyan 0.21.4 (not yet released) ## bunyan 0.21.4 (not yet released)
(nothing yet) - [issue #96] Fix `bunyan` to default to paging (with `less`) by default in
node 0.10.0. The intention has always been to default to paging for node
>=0.8.
## bunyan 0.21.3 ## bunyan 0.21.3

View file

@ -8,6 +8,7 @@
var VERSION = '0.21.4'; var VERSION = '0.21.4';
var p = console.log;
var util = require('util'); var util = require('util');
var pathlib = require('path'); var pathlib = require('path');
var vm = require('vm'); var vm = require('vm');
@ -165,7 +166,6 @@ function objCopy(obj) {
function printHelp() { function printHelp() {
/* BEGIN JSSTYLED */ /* BEGIN JSSTYLED */
var p = console.log;
p('Usage:'); p('Usage:');
p(' bunyan [OPTIONS] [FILE ...]'); p(' bunyan [OPTIONS] [FILE ...]');
p(' ... | bunyan [OPTIONS]'); p(' ... | bunyan [OPTIONS]');
@ -1399,7 +1399,7 @@ function main(argv) {
!opts.pids && // Don't page if following process output. !opts.pids && // Don't page if following process output.
opts.args.length > 0 && // Don't page if no file args to process. opts.args.length > 0 && // Don't page if no file args to process.
process.platform !== 'win32' && process.platform !== 'win32' &&
nodeVer >= [0, 8, 0] && (nodeVer[0] > 0 || nodeVer[1] >= 8) &&
(opts.paginate === true || (opts.paginate === true ||
(opts.paginate !== false && (opts.paginate !== false &&
(!process.env.BUNYAN_NO_PAGER || (!process.env.BUNYAN_NO_PAGER ||