aboutsummaryrefslogtreecommitdiff
path: root/src/lpm.lua
diff options
context:
space:
mode:
authorAdam Harrison <adamdharrison@gmail.com>2023-11-27 13:47:21 -0500
committerAdam Harrison <adamdharrison@gmail.com>2023-11-27 13:47:21 -0500
commit31b01534626dc4c93e6142183786fb58f8a7dde6 (patch)
tree209146e4d5a9093eca3b191b6eaaa658c6b5741a /src/lpm.lua
parentb29ecac1d63aacab6a914ccf49a6a9ef52c23530 (diff)
downloadlite-xl-plugin-manager-31b01534626dc4c93e6142183786fb58f8a7dde6.tar.gz
lite-xl-plugin-manager-31b01534626dc4c93e6142183786fb58f8a7dde6.zip
Allowed for generate_manifest to be used on local repositories; will automatically pile one into the directory.
Diffstat (limited to 'src/lpm.lua')
-rw-r--r--src/lpm.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lpm.lua b/src/lpm.lua
index fa216a4..1a08f64 100644
--- a/src/lpm.lua
+++ b/src/lpm.lua
@@ -1060,7 +1060,7 @@ local CORE_PLUGINS = {
projectsearch = true, quote = true, reflow = true, scale = true, tabularize = true, toolbarview = true, treeview = true, trimwhitespace = true, workspace = true
}
function Repository:generate_manifest(repo_id)
- if not self.commit and not self.branch then error("requires an instantiation") end
+ if not self.local_path and not self.commit and not self.branch then error("requires an instantiation") end
local path = self.local_path
local addons, addon_map = {}, {}
for _, folder in ipairs({ "plugins", "colors", "libraries" }) do
@@ -1096,7 +1096,7 @@ function Repository:generate_manifest(repo_id)
if file:find("%.lua$") then
local filename = common.basename(file):gsub("%.lua$", "")
local name = filename
- if name == "init" then name = repo_id or common.basename(self.remote) end
+ if name == "init" then name = repo_id or common.basename(self.remote or self.local_path) end
if name ~= "init" then
local type = folder == "colors" and "color" or (folder == "libraries" and "library" or "plugin")
local addon = { description = nil, id = name:lower():gsub("[^a-z0-9%-_]", ""), name = name, mod_version = LATEST_MOD_VERSION, version = "0.1", path = (filename ~= "init" and (addon_dir .. PATHSEP .. file) or nil), type = type }