1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-23 07:31:31 +00:00

Revert "loader/lua: Remove workaround for command_error"

This reverts commit 552f3072af.

loader.command_error was added just after 11.2, but appears to not have
been back ported to 11.x. 11.0 was the first lua loader release, so keep
this compat shim until we sort out what to do.

MFC After:		3 days
Sponsored by:		Netflix
Reviewed by:		kevans
Differential Revision:	https://reviews.freebsd.org/D45883
This commit is contained in:
Warner Losh 2024-07-29 16:57:13 -06:00
parent 522a65a8d9
commit 809edb3636

View File

@ -407,7 +407,12 @@ local function loadModule(mod, silent)
end
if cli_execute_unparsed(str) ~= 0 then
print(loader.command_error())
-- XXX Temporary shim: don't break the boot if
-- loader hadn't been recompiled with this
-- function exposed.
if loader.command_error then
print(loader.command_error())
end
if not silent then
print("failed!")
end