return the undefined the option

This commit is contained in:
Lion 2022-07-02 17:35:01 +08:00
parent 85d955b52a
commit 83707692e1
2 changed files with 6 additions and 0 deletions

View File

@ -40,6 +40,9 @@ for _, r in ipairs(arg) do
srcFile = v srcFile = v
elseif k == "cache-policy" then elseif k == "cache-policy" then
cachePolicy = v cachePolicy = v
else
print(string.format("undefined option `%s`", r))
return
end end
-- break the match iterate -- break the match iterate

View File

@ -37,6 +37,9 @@ for _, r in ipairs(arg) do
dbFile = v dbFile = v
elseif k == "cache-policy" then elseif k == "cache-policy" then
cachePolicy = v cachePolicy = v
else
print(string.format("undefined option `%s`", r))
return
end end
-- break the match iterate -- break the match iterate