aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Harrison <adamdharrison@gmail.com>2023-03-28 16:04:16 -0400
committerAdam Harrison <adamdharrison@gmail.com>2023-03-28 16:04:16 -0400
commit4325109c492712d3e3365ba48f44b004c759da54 (patch)
treee98e1211d575c211716ed8cec1ca829cc1576a13
parent1ff0fed4c0dc8d056a0f8da712fe0a518a1eb729 (diff)
downloadlite-xl-plugin-manager-4325109c492712d3e3365ba48f44b004c759da54.tar.gz
lite-xl-plugin-manager-4325109c492712d3e3365ba48f44b004c759da54.zip
Fixed some defaults around specifiying explicit binaries and datadirs for certain pathways.
-rw-r--r--src/lpm.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lpm.lua b/src/lpm.lua
index fe07990..c2e829c 100644
--- a/src/lpm.lua
+++ b/src/lpm.lua
@@ -2099,8 +2099,9 @@ not commonly used publically.
table.insert(lite_xls, LiteXL.new(nil, { version = lite_xl.version, mod_version = lite_xl.mod_version, binary_path = lite_xl.binary_path, datadir_path = lite_xl.datadir_path, path = lite_xl.path, tags = { "local" } }))
end
end
- local lite_xl_binary = BINARY or common.path("lite-xl" .. EXECUTABLE_EXTENSION)
+ if BINARY and not system.stat(BINARY) then error("can't find specified --binary") end
if DATADIR and not system.stat(DATADIR) then error("can't find specified --datadir") end
+ local lite_xl_binary = BINARY or common.path("lite-xl" .. EXECUTABLE_EXTENSION)
if lite_xl_binary then
local stat = system.stat(lite_xl_binary)
if not stat then error("can't find lite-xl binary " .. lite_xl_binary) end
@@ -2117,11 +2118,12 @@ not commonly used publically.
table.insert(lite_xls, system_lite_xl)
lpm_lite_xl_save()
else
+ if DATADIR then system_lite_xl.datadir_path = DATADIR end
table.insert(system_lite_xl.tags, "system")
end
system_bottle = Bottle.new(system_lite_xl, nil, true)
else
- system_bottle = Bottle.new(LiteXL.new(nil, { mod_version = MOD_VERSION or LATEST_MOD_VERSION, version = "system", tags = { "system", "local" } }), nil, true)
+ system_bottle = Bottle.new(LiteXL.new(nil, { mod_version = MOD_VERSION or LATEST_MOD_VERSION, datadir_path = DATADIR, version = "system", tags = { "system", "local" } }), nil, true)
end
if not system_bottle then system_bottle = Bottle.new(nil, nil, true) end
end, error_handler)