Apply suggestions from code review

suggestions by @williamboman and @TheDSCPL

Co-authored-by: William Boman <william@redwill.se>
Co-authored-by: Luis Durão <kpvrzlzzx@mozmail.com>
This commit is contained in:
Iordanis Petkakis 2025-05-14 11:42:51 +03:00 committed by GitHub
parent 0585eeac05
commit 64c4e501c6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 4 deletions

View file

@ -253,7 +253,7 @@ function M.get_pkg_path(pkg, path, opts)
opts = opts or {}
opts.warn = opts.warn == nil and true or opts.warn
path = path or ""
local ret = root .. "/packages/" .. pkg .. path
local ret = vim.fs.normalize(root .. "/packages/" .. pkg .. "/" .. path)
if opts.warn and not vim.loop.fs_stat(ret) and not require("lazy.core.config").headless() then
M.warn(
("Mason package path not found for **%s**:\n- `%s`\nYou may need to force update the package."):format(pkg, path)