Added 2 options for nix compatibility

Fully backwards compatible with minimal runtime impact
dev.extra_paths and performance.rtp.override_base_rtp
This commit is contained in:
BirdeeHub 2024-01-09 05:16:10 -08:00
commit 5f41e57c5e
4 changed files with 70 additions and 6 deletions

View file

@ -64,6 +64,19 @@ function M.norm(path)
return path:sub(-1) == "/" and path:sub(1, -2) or path
end
---@return table | nil
function M.norm_list(list)
if M.is_list(list) then
local normalized_paths = {}
for k, path in ipairs(list) do
table.insert(normalized_paths, k, M.norm(path))
end
return normalized_paths
else
return nil
end
end
---@param opts? {level?: number}
function M.pretty_trace(opts)
opts = opts or {}