fix bunyan CLI guard against -p and file args usage at the same time (was broken a while back)
This commit is contained in:
parent
994f90eb83
commit
58846afa89
2 changed files with 4 additions and 3 deletions
|
@ -7,7 +7,8 @@ Known issues:
|
||||||
|
|
||||||
## not yet released
|
## 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
|
## 1.8.9
|
||||||
|
|
|
@ -1525,9 +1525,9 @@ function main(argv) {
|
||||||
console.log('bunyan ' + getVersion());
|
console.log('bunyan ' + getVersion());
|
||||||
return;
|
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',
|
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);
|
return drainStdoutAndExit(1);
|
||||||
}
|
}
|
||||||
if (opts.color === null) {
|
if (opts.color === null) {
|
||||||
|
|
Loading…
Reference in a new issue