From 5cb8c16aa3ee62fe751b51dd57de8299dee4b7f5 Mon Sep 17 00:00:00 2001 From: Adam Harrison Date: Sat, 22 Apr 2023 11:59:01 -0400 Subject: Modified `run` so that it will use the system version if you do not specify one. --- src/lpm.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/lpm.lua') diff --git a/src/lpm.lua b/src/lpm.lua index 9a41848..9e37dfb 100644 --- a/src/lpm.lua +++ b/src/lpm.lua @@ -1530,10 +1530,14 @@ local function lpm_lite_xl_list() end local function lpm_lite_xl_run(version, ...) - if not version then error("requires a version") end + if not version then error("requires a version or arguments") end + local arguments = { ... } + if not version:find("^%d+") and version ~= "system" then + table.insert(arguments, 1, version) + version = "system" + end local lite_xl = get_lite_xl(version) or error("can't find lite-xl version " .. version) local addons = {} - local arguments = { ... } local i = 1 while i <= #arguments do if arguments[i] == "--" then break end -- cgit v1.2.3