Skip to content

Commit a56dfa1

Browse files
committed
ci: workaround for nixpkgs build failure (#1914)
1 parent 66fe00d commit a56dfa1

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

tests/file/ui_spec.lua

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,19 +149,30 @@ T["files()"]["executable"] = new_set({ parametrize = { { "fd" }, { "rg" }, { "fi
149149
return _G._exec(x)
150150
end
151151
]]):format(exclude))
152-
child.lua(([[
152+
-- Add postprocess callback for a more consistent wait on nixpkgs builds (#1914)
153+
-- ensure we're starting with nil value
154+
eq(child.lua_get([[_G._fzf_postprocess_called]]), vim.NIL)
155+
child.lua(([==[
153156
FzfLua.files({
154157
debug = 1,
155158
previewer = false,
156159
cwd_prompt = false,
157160
requires_processing = true, -- for "strip_cwd_prefix|debug"
158161
-- fzf_opts = { ["--wrap"] = true },
162+
__mt_postprocess = [[return function()
163+
local chan_id = vim.fn.sockconnect("pipe", _G._fzf_lua_server, { rpc = true })
164+
vim.rpcrequest(chan_id, "nvim_exec_lua", "_G._fzf_postprocess_called=true", {})
165+
vim.fn.chanclose(chan_id)
166+
end]],
159167
%s
160-
})]]):format(opts))
168+
})]==]):format(opts))
161169
eq(child.lua_get([[_G._fzf_lua_on_create]]), true)
162170
child.wait_until(function()
163171
return child.lua_get([[_G._fzf_load_called]]) == true
164172
end)
173+
child.wait_until(function()
174+
return child.lua_get([[_G._fzf_postprocess_called]]) == true
175+
end)
165176
child.expect_screen_lines(screen_opts)
166177
child.type_keys("<c-c>")
167178
child.wait_until(function()

0 commit comments

Comments
 (0)