Be more picky about command-line args in upbc.

pull/13171/head
Josh Haberman 8 years ago
parent 9cb10577fc
commit dd536fd567
  1. 5
      tools/upbc.lua

@ -15,8 +15,13 @@ local upb = require "upb"
local generate_upbdefs = false
for _, argument in ipairs(arg) do
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

Loading…
Cancel
Save