We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 92d6e49 commit 06451e3Copy full SHA for 06451e3
index.js
@@ -855,8 +855,8 @@ Command.prototype.version = function(str, flags) {
855
if (arguments.length === 0) return this._version;
856
this._version = str;
857
flags = flags || '-V, --version';
858
- var longOptIndex = flags.indexOf('--')
859
- this._versionOptionName = ~longOptIndex ? flags.substr(longOptIndex + 2) : 'version'
+ var longOptIndex = flags.indexOf('--');
+ this._versionOptionName = ~longOptIndex ? flags.substr(longOptIndex + 2) : 'version';
860
this.option(flags, 'output the version number');
861
this.on('option:' + this._versionOptionName, function() {
862
process.stdout.write(str + '\n');
0 commit comments