Skip to content

Commit 9a86af8

Browse files
committedMay 10, 2018
Use stdout(4) instead of stderr(4) for -v, -h
Closes GH-18.
1 parent 4852b1a commit 9a86af8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed
 

‎lib/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function start(cliConfig) {
3737
}
3838

3939
if (config.help) {
40-
process.stderr.write(
40+
process.stdout.write(
4141
[
4242
'Usage: ' + cliConfig.name + ' [options] [path | glob ...]',
4343
'',
@@ -55,7 +55,7 @@ function start(cliConfig) {
5555
}
5656

5757
if (config.version) {
58-
process.stderr.write(cliConfig.version + '\n', noop)
58+
process.stdout.write(cliConfig.version + '\n', noop)
5959

6060
return
6161
}

‎test/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ test('unified-args', function(t) {
162162
execa(bin, [flag]).then(onsuccess, st.fail)
163163

164164
function onsuccess(res) {
165-
st.deepEqual([res.stdout, res.stderr], ['', expected], 'should work')
165+
st.deepEqual([res.stdout, res.stderr], [expected, ''], 'should work')
166166
}
167167
})
168168
})
@@ -174,7 +174,7 @@ test('unified-args', function(t) {
174174
execa(bin, [flag]).then(onsuccess, st.fail)
175175

176176
function onsuccess(res) {
177-
st.deepEqual([res.stdout, res.stderr], ['', '0.0.0'], 'should work')
177+
st.deepEqual([res.stdout, res.stderr], ['0.0.0', ''], 'should work')
178178
}
179179
})
180180
})

0 commit comments

Comments
 (0)
Please sign in to comment.