Skip to content

Commit

Permalink
fix error when necessary options are missing
Browse files Browse the repository at this point in the history
  • Loading branch information
clippit committed Jan 26, 2015
1 parent 3b71672 commit 2491a87
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bin/nodeppt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ program
.action(function (filename, options) {
if(typeof filename === 'object'){
console.log('ERROR: please input filename!'.bold.red);
this.commands[0].outputHelp()
this.outputHelp();
return;
}

Expand Down Expand Up @@ -72,7 +72,7 @@ program
.option('-H, --host [host]', 'set host address', ipv4 || '0.0.0.0')
.action(function (cmd){
if(typeof cmd !== 'object'){
this.commands[2].outputHelp()
this.outputHelp();
return;
}

Expand All @@ -96,7 +96,7 @@ program
.action(function (http_url, save_path) {
if(typeof http_url !== 'string' || typeof save_path !== 'string'){
console.log('ERROR: pdf need a URL'.bold.red);
this.commands[3].outputHelp()
this.outputHelp();
return;
}

Expand Down

0 comments on commit 2491a87

Please sign in to comment.