diff options
author | Adam Harrison <adamdharrison@gmail.com> | 2023-01-13 14:47:00 -0500 |
---|---|---|
committer | Adam Harrison <adamdharrison@gmail.com> | 2023-01-13 14:47:00 -0500 |
commit | 17ce7c5ee47b4febde65d571993d4c963d85fcc1 (patch) | |
tree | 789075caebcd656fd8ec96fad818e861114abd67 /src/lpm.lua | |
parent | 9424e382ece5181f00f70f79219e3248a468eeaa (diff) | |
download | lite-xl-plugin-manager-17ce7c5ee47b4febde65d571993d4c963d85fcc1.tar.gz lite-xl-plugin-manager-17ce7c5ee47b4febde65d571993d4c963d85fcc1.zip |
Updated it so that lpm can run tests.
Diffstat (limited to 'src/lpm.lua')
-rw-r--r-- | src/lpm.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lpm.lua b/src/lpm.lua index faafdea..1601bee 100644 --- a/src/lpm.lua +++ b/src/lpm.lua @@ -1370,7 +1370,7 @@ local function lpm_lite_xl_run(version, ...) end local bottle = Bottle.new(lite_xl, addons) if not bottle:is_constructed() then bottle:construct() end - bottle:run(common.splice(arguments, i + 1)) + bottle:run(common.slice(arguments, i + 1)) end @@ -1799,6 +1799,11 @@ in any circumstance unless explicitly supplied. -- Small utility functions that don't play into the larger app; are used for testing -- or for handy scripts. + if ARGS[2] == "test" then + rawset(_G, "arg", common.slice(ARGS, 4)) + dofile(ARGS[3]) + os.exit(0) + end if ARGS[2] == "download" then local file = common.get(ARGS[3]); print(file) |