Skip to content

Commit cc1d5e2

Browse files
committed
Log error messages to stderr instead of stdout.
1 parent 01c9951 commit cc1d5e2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

bin/gapps

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ if (program.args.length == 0) {
5959
}
6060
if (err) {
6161
var p = require('process')
62-
console.log(err)
62+
console.error(err)
6363
program.outputHelp()
6464
p.exit(2)
6565
}

t/t010-basic-cli.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ tlib.test('help', (t) => {
2626

2727
tlib.test('no command fails', (t) => {
2828
const cmd = tlib.spawn(t, './bin/gapps')
29-
cmd.stdout.match('No command specified\n')
29+
cmd.stderr.match('No command specified\n')
3030
cmd.stdout.match(/Usage:/)
3131
if (tape_spawn_fixed)
3232
cmd.fails()
@@ -35,7 +35,7 @@ tlib.test('no command fails', (t) => {
3535

3636
tlib.test('bad commands fail', (t) => {
3737
const cmd = tlib.spawn(t, './bin/gapps rubbish')
38-
cmd.stdout.match('Bad command specified\n')
38+
cmd.stderr.match('Bad command specified\n')
3939
cmd.stdout.match(/Usage:/)
4040
if (tape_spawn_fixed)
4141
cmd.fails()

0 commit comments

Comments
 (0)