aboutsummaryrefslogtreecommitdiff
path: root/src/lpm.lua
diff options
context:
space:
mode:
authorAdam Harrison <adamdharrison@gmail.com>2023-04-22 11:59:01 -0400
committerAdam Harrison <adamdharrison@gmail.com>2023-04-22 11:59:01 -0400
commit5cb8c16aa3ee62fe751b51dd57de8299dee4b7f5 (patch)
treef0b732411dc5da39213d95d708997cb730cc5928 /src/lpm.lua
parent2cdc4e761fe525db14e7b80ee7976a6142c24a49 (diff)
downloadlite-xl-plugin-manager-5cb8c16aa3ee62fe751b51dd57de8299dee4b7f5.tar.gz
lite-xl-plugin-manager-5cb8c16aa3ee62fe751b51dd57de8299dee4b7f5.zip
Modified `run` so that it will use the system version if you do not specify one.
Diffstat (limited to 'src/lpm.lua')
-rw-r--r--src/lpm.lua8
1 files changed, 6 insertions, 2 deletions
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