Skip to content

Commit 534fdd8

Browse files
committed
Fix exit with help
1 parent 6b31fec commit 534fdd8

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "diff2html-cli",
3-
"version": "1.4.0",
3+
"version": "1.4.1",
44
"homepage": "https://www.github.com/rtfpessoa/diff2html-cli",
55
"description": "Fast Diff to colorized HTML",
66
"keywords": [

src/main.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ var cli = require('./cli.js').Diff2HtmlInterface;
1111
var log = require('./logger.js').Logger;
1212
var utils = require('./utils.js').Utils;
1313

14-
var argv = require('yargs')
15-
.usage('Usage: diff2html [options] -- [diff args]')
14+
var yargs = require('yargs');
15+
16+
var argv = yargs.usage('Usage: diff2html [options] -- [diff args]')
1617
.options({
1718
's': {
1819
alias: 'style',
@@ -138,7 +139,7 @@ function onInput(err, input) {
138139

139140
if (!input) {
140141
log.error('The input is empty. Try again.');
141-
argv.help();
142+
yargs.showHelp("log");
142143
}
143144

144145
if (argv.diffy) {

0 commit comments

Comments
 (0)