Skip to content

Commit

Permalink
fix(mason-registry): don't pass possible nil value to log (#840)
Browse files Browse the repository at this point in the history
  • Loading branch information
williamboman committed Jan 3, 2023
1 parent 4b8fc83 commit df1dd88
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/mason-registry/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ end
function M.get_package(package_name)
local ok, pkg = pcall(require, index[package_name])
if not ok then
log.error(pkg)
log.fmt_error("Failed to load package %s: %s", package_name, pkg or "")
error(("Cannot find package %q."):format(package_name))
end
return pkg
Expand Down

0 comments on commit df1dd88

Please sign in to comment.