Skip to content

Commit a21fac3

Browse files
committed
inject eca dependencies when using --clean mode
1 parent db32ed9 commit a21fac3

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

scripts/server_path.lua

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,19 @@ local ServerPath = {}
33
-- Setup if headless
44
if #vim.api.nvim_list_uis() == 0 then
55
_G.ServerPath = ServerPath
6+
7+
-- hijack to make server tests work on CI using --clean mode
8+
local eca_available = pcall(require, "eca")
9+
if not eca_available then
10+
vim.cmd([[let &rtp.=','.getcwd()]])
11+
vim.cmd('set rtp+=deps/nui.nvim')
12+
vim.cmd('set rtp+=deps/eca-nvim')
13+
end
14+
615
vim.o.swapfile = false
716
vim.o.backup = false
817
vim.o.writebackup = false
18+
919
require("eca").setup({})
1020
end
1121

tests/test_server_path.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ local function setup_test_environment()
99
"nvim",
1010
"--headless",
1111
"--noplugin",
12+
"--clean",
1213
"--cmd",
1314
[[lua package.preload["eca.path_finder"] = function()
1415
local M = {}

0 commit comments

Comments
 (0)