Skip to content

Commit

Permalink
add insecure option to the plugin spec
Browse files Browse the repository at this point in the history
  • Loading branch information
ngn13 committed Jan 4, 2025
1 parent 7e6c863 commit b6d2943
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions doc/lazy.nvim.txt
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,8 @@ SPEC SOURCE *lazy.nvim-🔌-plugin-spec-spec-source*

dev boolean? When true, a local plugin directory will be used instead. See
config.dev

insecure boolean? When true, SSL certificate verification will be disabled.
-----------------------------------------------------------------------------------
A valid spec should define one of `[1]`, `dir` or `url`.

Expand Down
5 changes: 5 additions & 0 deletions lua/lazy/manage/task/git.lua
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,11 @@ M.clone = {
vim.list_extend(args, { "-b", self.plugin.branch })
end

if self.plugin.insecure then
args[#args + 1] = "-c"
args[#args + 1] = "http.sslVerify=false"
end

table.insert(args, self.plugin.dir)

if vim.fn.isdirectory(self.plugin.dir) == 1 then
Expand Down

0 comments on commit b6d2943

Please sign in to comment.