mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-10-09 03:32:15 +00:00
test: --offline
for minit
This commit is contained in:
parent
46e59d838f
commit
4ded3ff73b
1 changed files with 4 additions and 1 deletions
|
@ -33,11 +33,14 @@ function M.setup(opts)
|
||||||
local args = {}
|
local args = {}
|
||||||
local is_busted = false
|
local is_busted = false
|
||||||
local is_minitest = false
|
local is_minitest = false
|
||||||
|
local offline = vim.env.LAZY_OFFLINE == "1" or vim.env.LAZY_OFFLINE == "true"
|
||||||
for _, a in ipairs(_G.arg) do
|
for _, a in ipairs(_G.arg) do
|
||||||
if a == "--busted" then
|
if a == "--busted" then
|
||||||
is_busted = true
|
is_busted = true
|
||||||
elseif a == "--minitest" then
|
elseif a == "--minitest" then
|
||||||
is_minitest = true
|
is_minitest = true
|
||||||
|
elseif a == "--offline" then
|
||||||
|
offline = true
|
||||||
else
|
else
|
||||||
table.insert(args, a)
|
table.insert(args, a)
|
||||||
end
|
end
|
||||||
|
@ -62,7 +65,7 @@ function M.setup(opts)
|
||||||
if vim.g.colors_name == nil then
|
if vim.g.colors_name == nil then
|
||||||
vim.cmd("colorscheme habamax")
|
vim.cmd("colorscheme habamax")
|
||||||
end
|
end
|
||||||
if not vim.env.LAZY_OFFLINE then
|
if not offline then
|
||||||
require("lazy").update():wait()
|
require("lazy").update():wait()
|
||||||
end
|
end
|
||||||
if vim.bo.filetype == "lazy" then
|
if vim.bo.filetype == "lazy" then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue