Skip to content

Commit

Permalink
fix: build
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Jun 17, 2024
1 parent 185212b commit 776d432
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions lua/lazy/manage/task/plugin.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
local Config = require("lazy.core.config")
local Loader = require("lazy.core.loader")
local Util = require("lazy.util")

Expand All @@ -18,7 +17,6 @@ M.build = {

Loader.load(self.plugin, { task = "build" })


local builders = type(self.plugin.build) == "table" and self.plugin.build or { self.plugin.build }
---@cast builders (string|fun(LazyPlugin))[]

Expand All @@ -34,25 +32,6 @@ M.build = {
elseif build:sub(1, 1) == ":" then
local cmd = vim.api.nvim_parse_cmd(build:sub(2), {})
self.output = vim.api.nvim_cmd(cmd, { output = true })

local builders = self.plugin.build

-- Skip if `build` is set to `false`
if builders == false then
return
end

local build_file = get_build_file(self.plugin)
if build_file then
if builders then
if Config.options.build.warn_on_override then
Util.warn(
("Plugin **%s** provides its own build script, but you also defined a `build` command.\nThe `build.lua` file will not be used"):format(
self.plugin.name
)
)
end

else
local shell = vim.env.SHELL or vim.o.shell
local shell_args = shell:find("cmd.exe", 1, true) and "/c" or "-c"
Expand Down

0 comments on commit 776d432

Please sign in to comment.