aboutsummaryrefslogtreecommitdiff
path: root/src/lpm.lua
diff options
context:
space:
mode:
authorAdam Harrison <adamdharrison@gmail.com>2024-03-08 12:42:24 -0500
committerAdam Harrison <adamdharrison@gmail.com>2024-03-08 12:42:24 -0500
commit3ad6ec2cad478f47da1f31fc531b691c0cb54eb9 (patch)
tree22040a1e26dc4ae61086ac3628cdfccf9956cb56 /src/lpm.lua
parentc2a9515792df186c2c4f4e987088bc0b9c5ccbdd (diff)
downloadlite-xl-plugin-manager-3ad6ec2cad478f47da1f31fc531b691c0cb54eb9.tar.gz
lite-xl-plugin-manager-3ad6ec2cad478f47da1f31fc531b691c0cb54eb9.zip
Restricted check of arched files to only non-optional files.
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 884be6d..38fa954 100644
--- a/src/lpm.lua
+++ b/src/lpm.lua
@@ -857,7 +857,7 @@ function Addon:install(bottle, installing)
end
- local has_arched_files = #common.grep(self.files or {}, function(e) return e.arch end) > 0
+ local has_nonoptional_arched_files = #common.grep(self.files or {}, function(e) return e.arch and not e.optional end) > 0
for _, arch in ipairs(ARCH) do
local has_one_file = false
for _, file in ipairs(self.files or {}) do
@@ -908,7 +908,7 @@ function Addon:install(bottle, installing)
end
end
- if has_arched_files and not has_one_file and (not self.arch or (self.arch ~= "*" and #common.grep(self.arch, function(a) return a == arch end) == 0)) then
+ if has_nonoptional_arched_files and not has_one_file and (not self.arch or (self.arch ~= "*" and #common.grep(self.arch, function(a) return a == arch end) == 0)) then
error("Addon " .. self.id .. " does not support arch " .. arch)
end
end