diff --git a/CHANGES.md b/CHANGES.md index 7e251c8..3e0ef36 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -7,7 +7,8 @@ Known issues: ## not yet released -(nothing yet) +- Ensure that `bunyan` errors out if attempting to use `-p PID` and + file args at the same time. ## 1.8.9 diff --git a/bin/bunyan b/bin/bunyan index 1ff7c12..9c1595c 100755 --- a/bin/bunyan +++ b/bin/bunyan @@ -1525,9 +1525,9 @@ function main(argv) { console.log('bunyan ' + getVersion()); return; } - if (opts.pid && opts.args.length > 0) { + if (opts.pids && opts.args.length > 0) { warn('bunyan: error: can\'t use both "-p PID" (%s) and file (%s) args', - opts.pid, opts.args.join(' ')); + opts.pids, opts.args.join(' ')); return drainStdoutAndExit(1); } if (opts.color === null) {