Make LuaComp actually use argparse instead of trying to call a nil function

add_complete() doesn't seem to exist in argparse anymore so I commented it out
This commit is contained in:
Atirut Wattanamongkol 2021-04-16 16:56:05 +07:00
parent 062f7544d5
commit 832798a3a5
1 changed files with 2 additions and 1 deletions

View File

@ -15,6 +15,7 @@ end
--#include "src/directive_provider.lua"
--#include "src/cfg/minifier_providers.lua"
local argparse = require("argparse")
local parser = argparse(arg[0], "LuaComp v"..LUACOMP_VERSION.."\nA preprocessor+postprocessor written in Lua.")
parser:argument("input", "Input file (- for STDIN)")
parser:option("-O --output", "Output file. (- for STDOUT)", "-")
@ -46,7 +47,7 @@ parser:flag("-v --version", "Prints the version and exits"):action(function()
print(LUACOMP_VERSION)
os.exit(0)
end)
parser:add_complete()
-- parser:add_complete()
local args = parser:parse()
local file = args.input
_sv("LUACOMP_MINIFIER", args.minifier)