From 82e39386d256f9af0e383b0404747400b5a39dcd Mon Sep 17 00:00:00 2001 From: Adam Harrison Date: Mon, 27 Nov 2023 15:09:54 -0500 Subject: Added in a proper repo_path. --- plugins/plugin_manager/init.lua | 2 +- plugins/plugin_manager/plugin_view.lua | 2 +- src/lpm.lua | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/plugin_manager/init.lua b/plugins/plugin_manager/init.lua index 5ff7911..4c23f98 100644 --- a/plugins/plugin_manager/init.lua +++ b/plugins/plugin_manager/init.lua @@ -153,7 +153,7 @@ function PluginManager:refresh(options) for i, addon in ipairs(self.addons) do if addon.status ~= "incompatible" then table.insert(self.valid_addons, addon) - if (addon.id == "plugin_manager" or addon.id == "json") and addon.status == "installed" then + if (addon.id == "plugin_manager" or addon.id == "json") and (addon.status == "installed" or addon.status == "orphan") then addon.status = "special" end end diff --git a/plugins/plugin_manager/plugin_view.lua b/plugins/plugin_manager/plugin_view.lua index 6abf2de..9e9d67c 100644 --- a/plugins/plugin_manager/plugin_view.lua +++ b/plugins/plugin_manager/plugin_view.lua @@ -345,7 +345,7 @@ end, { local directories = { plugin.path } if plugin.repo_path then table.insert(directories, plugin.repo_path) - table.insert(directories, plugin.repo_path:gsub(PATHSEP .. "plugins" .. PATHSEP .. plugin.id .. "$", "")) + table.insert(directories, ("" .. plugin.repo_path:gsub(PATHSEP .. "plugins" .. PATHSEP .. plugin.id .. "$", ""))) end for _, directory in ipairs(directories) do for i, path in ipairs({ directory .. PATHSEP .. "README.md", directory .. PATHSEP .. "readme.md" }) do diff --git a/src/lpm.lua b/src/lpm.lua index 09c6ca9..5f1ed8c 100644 --- a/src/lpm.lua +++ b/src/lpm.lua @@ -1808,7 +1808,7 @@ local function print_addon_info(type, addons, filters) organization = addon.organization, repository = addon.repository and addon.repository:url(), path = addon:get_path(system_bottle), - repo_path = addon.repo_path or addon.repository.local_path, + repo_path = addon.repo_path or (addon.repository and addon.repository.local_path or nil), url = url } if addon_matches_filter(hash, filters or {}) then -- cgit v1.2.3