From 5e0662727d34ff5f66ce0c1798d0a7cd3163e90a Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 1 Dec 2022 08:40:17 +0100 Subject: [PATCH] style: fixed some selene errors/warnings --- lua/lazy/core/plugin.lua | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lua/lazy/core/plugin.lua b/lua/lazy/core/plugin.lua index 3d3c958..9b933f2 100644 --- a/lua/lazy/core/plugin.lua +++ b/lua/lazy/core/plugin.lua @@ -67,9 +67,7 @@ function Spec:add(plugin, is_dep) local c = pkg:sub(1, 1) if c == "~" then plugin.uri = vim.loop.os_getenv("HOME") .. pkg:sub(2) - elseif c == "/" then - plugin.uri = pkg - elseif pkg:sub(1, 4) == "http" or pkg:sub(1, 3) == "ssh" then + elseif c == "/" or pkg:sub(1, 4) == "http" or pkg:sub(1, 3) == "ssh" then plugin.uri = pkg else plugin.uri = ("https://github.com/" .. pkg .. ".git") @@ -202,8 +200,7 @@ function M.spec() local function _load(name, modpath) local modname = Config.options.plugins .. (name and ("." .. name) or "") Util.try(function() - local mod = Module.load(modname, modpath) - spec:normalize(assert(mod)) + spec:normalize(Module.load(modname, modpath)) end, "Failed to load **" .. modname .. "**") end