diff options
author | Adam Harrison <adamdharrison@gmail.com> | 2022-10-25 09:50:40 -0400 |
---|---|---|
committer | Adam Harrison <adamdharrison@gmail.com> | 2022-10-25 09:50:40 -0400 |
commit | 9a9b023e120b1919ba06e150ba4b345cefdd1765 (patch) | |
tree | 31b0e2ee64acdc2338ee63286b43b9e7a64692f8 /src/lpm.lua | |
parent | 49bae736fc589a4a82cfeab1e73e3a9db650f190 (diff) | |
download | lite-xl-plugin-manager-9a9b023e120b1919ba06e150ba4b345cefdd1765.tar.gz lite-xl-plugin-manager-9a9b023e120b1919ba06e150ba4b345cefdd1765.zip |
Making build.sh more compatible with older cmakes. Also, fixed some issues when system lite-xl is not found.
Diffstat (limited to 'src/lpm.lua')
-rw-r--r-- | src/lpm.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lpm.lua b/src/lpm.lua index 238d5f9..4b1165a 100644 --- a/src/lpm.lua +++ b/src/lpm.lua @@ -509,6 +509,7 @@ function Plugin.new(repository, metadata) dependencies = {}, local_path = repository and (repository.local_path .. PATHSEP .. (repository.commit or repository.branch) .. (metadata.path and (PATHSEP .. metadata.path:gsub("^/", "")) or "")), }, metadata), Plugin) + self.type = type -- Directory. self.organization = metadata.organization or (((self.files and #self.files > 0) or self.remote or (not self.path and not self.url)) and "complex" or "singleton") return self @@ -1576,13 +1577,15 @@ Flags have the following effects: if not system_lite_xl then system_lite_xl = common.first(lite_xls, function(e) return e.version == "system" end) if system_lite_xl then error("can't find existing system lite (does " .. system_lite_xl.local_path .. " exist? was it moved?); run `lpm purge`, or resolve otherwise") end - system_lite_xl = LiteXL.new(nil, { path = directory, mod_version = 3, version = "system", tags = { "system", "local" } }) + system_lite_xl = LiteXL.new(nil, { path = directory, mod_version = MOD_VERSION or 3, version = "system", tags = { "system", "local" } }) table.insert(lite_xls, system_lite_xl) lpm_lite_xl_save() else 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 3, version = "system", tags = { "system", "local" } }), nil, true) end if not system_bottle then system_bottle = Bottle.new(nil, nil, true) end |