From 9f5e1a5e80cd8378882cb914f7964ef44d1c92b0 Mon Sep 17 00:00:00 2001 From: Adam Harrison Date: Sun, 21 Apr 2024 02:14:33 -0400 Subject: Fixed type inference. --- src/lpm.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/lpm.lua b/src/lpm.lua index 284273c..354a3fe 100644 --- a/src/lpm.lua +++ b/src/lpm.lua @@ -1532,9 +1532,15 @@ function Bottle:all_addons() return e.local_path and not Addon.is_addon_different(e.local_path, path) end)[1] if i == 2 or not hash[id] or not matching then + local translations = { + plugins = "plugin", + libraries = "library", + fonts = "font", + colors = "color" + } table.insert(t, Addon.new(nil, { id = id, - type = (addon_type == "plugins" and "plugin") or "library", + type = (translations[addon_type] or "plugin"), location = (i == 2 and (hash[id] and "bundled" or "core")) or "user", organization = (v:find("%.lua$") and "singleton" or "complex"), local_path = path, @@ -2223,7 +2229,7 @@ xpcall(function() ARGS = common.args(ARGS, { json = "flag", userdir = "string", cachedir = "string", version = "flag", verbose = "flag", quiet = "flag", version = "flag", ["mod-version"] = "string", remotes = "flag", help = "flag", - remotes = "flag", ["ssl-certs"] = "string", force = "flag", arch = "array", ["assume-yes"] = "flag", + ["ssl-certs"] = "string", force = "flag", arch = "array", ["assume-yes"] = "flag", ["no-install-optional"] = "flag", datadir = "string", binary = "string", trace = "flag", progress = "flag", symlink = "flag", reinstall = "flag", ["no-color"] = "flag", config = "string", table = "string", header = "string", repository = "string", ephemeral = "flag", mask = "array", raw = "string", plugin = "array", -- cgit v1.2.3