summaryrefslogtreecommitdiff
path: root/find-git2
blob: 6bdca05970d216f092db85c244688da8f073522a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
-- -*- Lua -*-

-- Our goal is to find git2.so so we can blacklist it for the duration of
-- tests.  This is done by essentially rummaging in the package loaders...

dofile("blacklist-system-git2")

local ffunc, loc = package.searchers[3]('gall.ll.git2')

local locs = {}
while ffunc ~= nil do
   locs[#locs+1] = loc
   package.searchers[3] = __gall_ll_git2_blacklister(package.searchers[3], loc)
   ffunc, loc = package.searchers[3]('gall.ll.git2')
end

print(table.concat(locs, ":"))