mirror of
https://github.com/TangentFoxy/argparse.git
synced 2025-07-28 11:02:20 +00:00
Minor change in an error message
This commit is contained in:
@@ -51,7 +51,7 @@ describe("tests related to commands", function()
|
|||||||
assert.same({}, args)
|
assert.same({}, args)
|
||||||
|
|
||||||
parser:require_command(true)
|
parser:require_command(true)
|
||||||
assert.has_error(function() parser:parse{} end, "command is required")
|
assert.has_error(function() parser:parse{} end, "a command is required")
|
||||||
end)
|
end)
|
||||||
|
|
||||||
it("Detects wrong commands", function()
|
it("Detects wrong commands", function()
|
||||||
|
@@ -746,7 +746,7 @@ function Parser:parse(args)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if parser._require_command and #commands > 0 then
|
if parser._require_command and #commands > 0 then
|
||||||
parser:error("command is required")
|
parser:error("a command is required")
|
||||||
end
|
end
|
||||||
|
|
||||||
for _, option in ipairs(options) do
|
for _, option in ipairs(options) do
|
||||||
|
Reference in New Issue
Block a user