aboutsummaryrefslogtreecommitdiff
path: root/plugins/plugin_manager/init.lua
diff options
context:
space:
mode:
authorAdam <adamdharrison@gmail.com>2022-09-18 21:15:41 -0400
committerAdam <adamdharrison@gmail.com>2022-09-18 21:15:41 -0400
commit32cb25250832d4a587ce9992f891b5731c9bd8d0 (patch)
tree63a9ad2bc679dba247b47b26ae74e1b9677eba14 /plugins/plugin_manager/init.lua
parent3c17efb0fbc6d26d3a59790ba26fab6756688d41 (diff)
downloadlite-xl-plugin-manager-32cb25250832d4a587ce9992f891b5731c9bd8d0.tar.gz
lite-xl-plugin-manager-32cb25250832d4a587ce9992f891b5731c9bd8d0.zip
Almost done.
Diffstat (limited to 'plugins/plugin_manager/init.lua')
-rw-r--r--plugins/plugin_manager/init.lua9
1 files changed, 5 insertions, 4 deletions
diff --git a/plugins/plugin_manager/init.lua b/plugins/plugin_manager/init.lua
index 0520030..20a5b9d 100644
--- a/plugins/plugin_manager/init.lua
+++ b/plugins/plugin_manager/init.lua
@@ -11,8 +11,9 @@ local PluginManager = {
last_refresh = nil,
requires_restart = false
}
+local binary_extension = (PLATFORM == "Windows" and ".exe" or "")
config.plugins.plugin_manager = common.merge({
- lpm_binary_name = "lpm." .. ARCH .. (PLATFORM == "Windows" and ".exe" or ""),
+ lpm_binary_name = "lpm." .. ARCH .. binary_extension,
lpm_binary_path = nil,
-- Restarts the plugin manager on changes.
restart_on_change = true,
@@ -34,13 +35,13 @@ if not config.plugins.plugin_manager.lpm_binary_path then
local paths = {
DATADIR .. PATHSEP .. "plugins" .. PATHSEP .. "plugin_manager" .. PATHSEP .. config.plugins.plugin_manager.lpm_binary_name,
DATADIR .. PATHSEP .. "plugins" .. PATHSEP .. "plugin_manager" .. PATHSEP .. config.plugins.plugin_manager.lpm_binary_name,
- USERDIR .. PATHSEP .. "plugins" .. PATHSEP .. "plugin_manager" .. PATHSEP .. "lpm",
- USERDIR .. PATHSEP .. "plugins" .. PATHSEP .. "plugin_manager" .. PATHSEP .. "lpm",
+ USERDIR .. PATHSEP .. "plugins" .. PATHSEP .. "plugin_manager" .. PATHSEP .. "lpm" .. binary_extension,
+ USERDIR .. PATHSEP .. "plugins" .. PATHSEP .. "plugin_manager" .. PATHSEP .. "lpm" .. binary_extension,
}
local path, s = os.getenv("PATH"), 1
while true do
local _, e = path:find(":", s)
- table.insert(paths, path:sub(s, e and (e-1) or #path) .. PATHSEP .. "lpm")
+ table.insert(paths, path:sub(s, e and (e-1) or #path) .. PATHSEP .. "lpm" .. binary_extension)
if not e then break end
s = e + 1
end