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 bfd93f8..a538b1c 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 if src then print("upbc can only handle one input file at a time.") |