Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: errors quote #915

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 5 additions & 5 deletions index.js
Expand Up @@ -792,7 +792,7 @@ Command.prototype.opts = function() {
*/

Command.prototype.missingArgument = function(name) {
console.error("error: missing required argument `%s'", name);
console.error("error: missing required argument '%s'", name);
process.exit(1);
};

Expand All @@ -806,9 +806,9 @@ Command.prototype.missingArgument = function(name) {

Command.prototype.optionMissingArgument = function(option, flag) {
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);
}
process.exit(1);
};
Expand All @@ -822,7 +822,7 @@ Command.prototype.optionMissingArgument = function(option, flag) {

Command.prototype.unknownOption = function(flag) {
if (this._allowUnknownOption) return;
console.error("error: unknown option `%s'", flag);
console.error("error: unknown option '%s'", flag);
process.exit(1);
};

Expand All @@ -834,7 +834,7 @@ Command.prototype.unknownOption = function(flag) {
*/

Command.prototype.variadicArgNotLast = function(name) {
console.error("error: variadic arguments must be last `%s'", name);
console.error("error: variadic arguments must be last '%s'", name);
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(1);
info[0].should.equal("error: option `-c, --cheese <type>' argument missing");
info[0].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 @@ -57,4 +57,4 @@ try {
process.exit = oldProcessExit;
console.error = oldConsoleError;

'error: variadic arguments must be last `variadicArg\''.should.eql(errorMessage);
'error: variadic arguments must be last \'variadicArg\''.should.eql(errorMessage);