Skip to content

Commit

Permalink
Log error messages to stderr instead of stdout.
Browse files Browse the repository at this point in the history
  • Loading branch information
nishantjr committed Jan 24, 2016
1 parent 01c9951 commit cc1d5e2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bin/gapps
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ if (program.args.length == 0) {
}
if (err) {
var p = require('process')
console.log(err)
console.error(err)
program.outputHelp()
p.exit(2)
}
4 changes: 2 additions & 2 deletions t/t010-basic-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ tlib.test('help', (t) => {

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

tlib.test('bad commands fail', (t) => {
const cmd = tlib.spawn(t, './bin/gapps rubbish')
cmd.stdout.match('Bad command specified\n')
cmd.stderr.match('Bad command specified\n')
cmd.stdout.match(/Usage:/)
if (tape_spawn_fixed)
cmd.fails()
Expand Down

0 comments on commit cc1d5e2

Please sign in to comment.