Comparing version 4.3.4 to 4.3.5
@@ -276,3 +276,3 @@ 'use strict'; | ||
class Cac extends EventEmitter { | ||
constructor({ bin, pkg } = {}) { | ||
constructor({ bin, pkg, showHelp } = {}) { | ||
super(); | ||
@@ -283,2 +283,3 @@ this.bin = bin || path.basename(process.argv[1]); | ||
this.extraHelps = []; | ||
this.shouldShowHelp = showHelp || ((command, input, flags) => flags.help); | ||
@@ -417,3 +418,3 @@ this.pkg = Object.assign({}, pkg || readPkg.sync({ cwd: parentDir, normalize: false }).pkg); | ||
if (flags.help) { | ||
if (this.shouldShowHelp(command, input, flags)) { | ||
this.showHelp(); | ||
@@ -428,2 +429,4 @@ } else if (flags.version) { | ||
} | ||
this.emit('executed', command, input, flags); | ||
return res; | ||
} catch (err) { | ||
@@ -433,4 +436,2 @@ this.handleError(err); | ||
} | ||
this.emit('executed', command, input, flags); | ||
} | ||
@@ -437,0 +438,0 @@ |
{ | ||
"name": "cac", | ||
"version": "4.3.4", | ||
"version": "4.3.5", | ||
"description": "Command-line queen.", | ||
@@ -5,0 +5,0 @@ "repository": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21646
373