diff options
Diffstat (limited to 'tools/upbc.lua')
-rw-r--r-- | tools/upbc.lua | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/upbc.lua b/tools/upbc.lua index bf9a68d..9d9531c 100644 --- a/tools/upbc.lua +++ b/tools/upbc.lua @@ -15,8 +15,13 @@ local upb = require "upb" local generate_upbdefs = false for _, argument in ipairs(arg) do - if argument == "--generate-upbdefs" then - generate_upbdefs = true + if argument.sub(argument, 1, 2) == "--" then + if argument == "--generate-upbdefs" then + generate_upbdefs = true + else + print("Unknown flag: " .. argument) + return 1 + end else src = argument end |