aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorAdam <adamdharrison@gmail.com>2022-09-18 22:50:16 -0400
committerAdam <adamdharrison@gmail.com>2022-09-18 22:50:16 -0400
commitf806a1041a1e80afb2f3146d90a759ee710a47c7 (patch)
treed47bb808336306f25b4a4de4aef22dbea18d4149 /plugins
parent9729829d2bdd378ef63184af4c0c7fb8fedf8943 (diff)
downloadlite-xl-plugin-manager-f806a1041a1e80afb2f3146d90a759ee710a47c7.tar.gz
lite-xl-plugin-manager-f806a1041a1e80afb2f3146d90a759ee710a47c7.zip
Fixed a few things.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/plugin_manager/init.lua14
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/plugin_manager/init.lua b/plugins/plugin_manager/init.lua
index 20a5b9d..6564e5b 100644
--- a/plugins/plugin_manager/init.lua
+++ b/plugins/plugin_manager/init.lua
@@ -29,13 +29,13 @@ config.plugins.plugin_manager = common.merge({
debug = false
}, config.plugins.plugin_manager)
-package.path = package.path .. ";" .. USERDIR .. "libraries/?.lua" .. ";" .. USERDIR .. "libraries/?/init.lua"
+package.path = package.path .. ";" .. USERDIR .. "/libraries/?.lua" .. ";" .. USERDIR .. "/libraries/?/init.lua" .. ";" .. DATADIR .. "/libraries/?.lua" .. ";" .. DATADIR .. "/libraries/?/init.lua"
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" .. binary_extension,
+ USERDIR .. PATHSEP .. "plugins" .. PATHSEP .. "plugin_manager" .. PATHSEP .. config.plugins.plugin_manager.lpm_binary_name,
+ DATADIR .. 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
@@ -90,9 +90,9 @@ local function run(cmd)
local still_running = true
while true do
local chunk = v[1]:read_stdout(2048)
- if config.plugins.plugin_manager.debug then print(chunk) end
- if chunk and #chunk == 0 then break end
- if chunk ~= nil then
+ if config.plugins.plugin_manager.debug then io.stdout:write(chunk) end
+ if chunk and v[1]:running() and #chunk == 0 then break end
+ if chunk ~= nil and #chunk > 0 then
v[3] = v[3] .. chunk
has_chunk = true
else
@@ -101,7 +101,7 @@ local function run(cmd)
v[2]:resolve(v[3])
else
local err = v[1]:read_stderr(2048)
- core.error("error running lpm: " .. err)
+ core.error("error running lpm: " .. (err or "?"))
v[2]:reject(v[3])
end
break