mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-01-29 15:44:26 +00:00
Make use of yargs.showHelp() instead of yargs.help(), as the latter uses
stderr by default
This commit is contained in:
parent
d6c8d77ceb
commit
ee0fc8206f
@ -27,7 +27,7 @@ commandApplies = (command, args) ->
|
||||
|
||||
run = ->
|
||||
if not @command._matchedCommand?
|
||||
return console.log(@help())
|
||||
return @showHelp()
|
||||
signature = splitSignature(@command._matchedCommand.signature)
|
||||
parameters = _.difference(@argv._, signature)
|
||||
@command._matchedCommand.action.apply(this, parameters)
|
||||
|
@ -110,6 +110,6 @@ describe 'Yargs Command:', ->
|
||||
expect(callback).to.have.been.calledWith(_.last(ARGS.appList._))
|
||||
|
||||
it 'should print help if no matches', ->
|
||||
helpSpy = sinon.spy(yargs, 'help')
|
||||
helpSpy = sinon.spy(yargs, 'showHelp')
|
||||
yargs.command.run()
|
||||
expect(helpSpy).to.have.been.called
|
||||
|
Loading…
x
Reference in New Issue
Block a user