fix(util): make sure mason is loaded when getting package paths

This commit is contained in:
Folke Lemaitre 2024-06-01 08:48:29 +02:00
parent 276b50e389
commit a6df15a63f
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -226,6 +226,7 @@ end
---@param path? string
---@param opts? { warn?: boolean }
function M.get_pkg_path(pkg, path, opts)
require("mason") -- make sure Mason is loaded
opts = opts or {}
opts.warn = opts.warn == nil and true or opts.warn
path = path or ""