Skip to content

Commit fe43693

Browse files
committed
Add option to override lua version
1 parent e71a092 commit fe43693

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/cli.lua

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ local function lines_from(file)
4141
local config;
4242
local sourceFile;
4343
local outFile;
44+
local luaVersion;
4445

4546
Prometheus.colors.enabled = true;
4647

@@ -82,6 +83,10 @@ while i <= #arg do
8283
outFile = arg[i];
8384
elseif curr == "--nocolors" then
8485
Prometheus.colors.enabled = false;
86+
elseif curr == "--Lua51" then
87+
luaVersion = "Lua51";
88+
elseif curr == "--LuaU" then
89+
luaVersion = "LuaU";
8590
else
8691
Prometheus.Logger:warn(string.format("The option \"%s\" is not valid and therefore ignored", curr));
8792
end
@@ -103,6 +108,9 @@ if not config then
103108
config = Prometheus.Presets.Minify;
104109
end
105110

111+
-- Add Option to override Lua Version
112+
config.LuaVersion = luaVersion or config.LuaVersion;
113+
106114
if not file_exists(sourceFile) then
107115
Prometheus.Logger:error(string.format("The File \"%s\" was not found!", sourceFile));
108116
end

0 commit comments

Comments
 (0)