Skip to content

Commit

Permalink
removed indentation from errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredpetersen authored and roman-vanesyan committed Oct 1, 2018
1 parent 2c20e91 commit b6549f2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions index.js
Expand Up @@ -793,7 +793,7 @@ Command.prototype.opts = function() {

Command.prototype.missingArgument = function(name) {
console.error();
console.error(" error: missing required argument `%s'", name);
console.error("error: missing required argument `%s'", name);
console.error();
process.exit(1);
};
Expand All @@ -809,9 +809,9 @@ Command.prototype.missingArgument = function(name) {
Command.prototype.optionMissingArgument = function(option, flag) {
console.error();
if (flag) {
console.error(" error: option `%s' argument missing, got `%s'", option.flags, flag);
console.error("error: option `%s' argument missing, got `%s'", option.flags, flag);
} else {
console.error(" error: option `%s' argument missing", option.flags);
console.error("error: option `%s' argument missing", option.flags);
}
console.error();
process.exit(1);
Expand All @@ -827,7 +827,7 @@ Command.prototype.optionMissingArgument = function(option, flag) {
Command.prototype.unknownOption = function(flag) {
if (this._allowUnknownOption) return;
console.error();
console.error(" error: unknown option `%s'", flag);
console.error("error: unknown option `%s'", flag);
console.error();
process.exit(1);
};
Expand All @@ -841,7 +841,7 @@ Command.prototype.unknownOption = function(flag) {

Command.prototype.variadicArgNotLast = function(name) {
console.error();
console.error(" error: variadic arguments must be last `%s'", name);
console.error("error: variadic arguments must be last `%s'", name);
console.error();
process.exit(1);
};
Expand Down
2 changes: 1 addition & 1 deletion test/test.options.args.required.js
Expand Up @@ -15,7 +15,7 @@ console.error = function () {
process.on('exit', function (code) {
code.should.equal(1);
info.length.should.equal(3);
info[1].should.equal(" error: option `-c, --cheese <type>' argument missing");
info[1].should.equal("error: option `-c, --cheese <type>' argument missing");
process.exit(0)
});

Expand Down
2 changes: 1 addition & 1 deletion test/test.variadic.args.js
Expand Up @@ -59,6 +59,6 @@ console.error = oldConsoleError;

[
'',
' error: variadic arguments must be last `variadicArg\'',
'error: variadic arguments must be last `variadicArg\'',
''
].join('\n').should.eql(errorMessage);

0 comments on commit b6549f2

Please sign in to comment.