mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
fix(loader): follow the style of the error message for built-in loaders
start the error message with '\n\t' instead of '\n' surround the module name by single quotes
This commit is contained in:
parent
9768e88f38
commit
67bb0cfa79
@ -200,7 +200,7 @@ function Loader.loader(modname)
|
|||||||
return chunk or error(err)
|
return chunk or error(err)
|
||||||
end
|
end
|
||||||
Loader._hashes = nil
|
Loader._hashes = nil
|
||||||
return '\ncache_loader: module ' .. modname .. ' not found'
|
return ("\n\tcache_loader: module '%s' not found"):format(modname)
|
||||||
end
|
end
|
||||||
|
|
||||||
--- The `package.loaders` loader for libs
|
--- The `package.loaders` loader for libs
|
||||||
@ -222,7 +222,7 @@ function Loader.loader_lib(modname)
|
|||||||
local chunk, err = package.loadlib(ret.modpath, 'luaopen_' .. funcname:gsub('%.', '_'))
|
local chunk, err = package.loadlib(ret.modpath, 'luaopen_' .. funcname:gsub('%.', '_'))
|
||||||
return chunk or error(err)
|
return chunk or error(err)
|
||||||
end
|
end
|
||||||
return '\ncache_loader_lib: module ' .. modname .. ' not found'
|
return ("\n\tcache_loader_lib: module '%s' not found"):format(modname)
|
||||||
end
|
end
|
||||||
|
|
||||||
--- `loadfile` using the cache
|
--- `loadfile` using the cache
|
||||||
|
Loading…
Reference in New Issue
Block a user