You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
466 B
Lua

local utils = require 'utils'
-- dirconfig
local function not_installed(program)
return utils.which(program) == nil
end
local function needs(config, program, glob)
if not_installed(program) then
table.insert(config.exclude, glob)
end
end
local function enhanced_dircfg(config)
setmetatable(config, { __index = { needs = needs } })
return config
end
return {
not_installed = not_installed,
needs = needs,
enhance_dircfg = enhanced_dircfg,
}