Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Feb 2024 17:59:32 GMT
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: ab97d42addae - main - loader/lua: Remove compat shim for loader.lua_path
Message-ID:  <202402291759.41THxW00077645@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=ab97d42addae97a389c6f22d6bba62ed954bb8e7

commit ab97d42addae97a389c6f22d6bba62ed954bb8e7
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2024-02-29 17:58:52 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2024-02-29 17:58:52 +0000

    loader/lua: Remove compat shim for loader.lua_path
    
    loader.lua_path was committed before stable/13 was branched, and merged
    in to for 12.2. Remove workaround for it not being present.
    
    Sponsored by:           Netflix
    Reviewed by:            kevans
    Differential Revision:  https://reviews.freebsd.org/D44143
---
 stand/lua/core.lua | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/stand/lua/core.lua b/stand/lua/core.lua
index 9226de564348..eaabff6a7602 100644
--- a/stand/lua/core.lua
+++ b/stand/lua/core.lua
@@ -65,13 +65,7 @@ end
 -- message on failure.
 function try_include(module)
 	if module:sub(1, 1) ~= "/" then
-		local lua_path = loader.lua_path
-		-- XXX Temporary compat shim; this should be removed once the
-		-- loader.lua_path export has sufficiently spread.
-		if lua_path == nil then
-			lua_path = "/boot/lua"
-		end
-		module = lua_path .. "/" .. module
+		module = loader.lua_path .. "/" .. module
 		-- We only attempt to append an extension if an absolute path
 		-- wasn't specified.  This assumes that the caller either wants
 		-- to treat this like it would require() and specify just the



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202402291759.41THxW00077645>