comparison util/paths.lua @ 14193:de95e133af8e 13.0

util.paths: Fix check for adding installer path to package.cpath
author Matthew Wild <mwild1@gmail.com>
date Tue, 26 May 2026 11:50:20 +0100
parents 2ac63715ef6f
children
comparison
equal deleted inserted replaced
14191:e86ede52bfbe 14193:de95e133af8e
60 local sub_path = dir_sep.."lua"..dir_sep..lua_version..dir_sep; 60 local sub_path = dir_sep.."lua"..dir_sep..lua_version..dir_sep;
61 if not string.find(package.path, installer_plugin_path, 1, true) then 61 if not string.find(package.path, installer_plugin_path, 1, true) then
62 package.path = package.path..lua_path_sep..installer_plugin_path..dir_sep.."share"..sub_path.."?.lua"; 62 package.path = package.path..lua_path_sep..installer_plugin_path..dir_sep.."share"..sub_path.."?.lua";
63 package.path = package.path..lua_path_sep..installer_plugin_path..dir_sep.."share"..sub_path.."?"..dir_sep.."init.lua"; 63 package.path = package.path..lua_path_sep..installer_plugin_path..dir_sep.."share"..sub_path.."?"..dir_sep.."init.lua";
64 end 64 end
65 if not string.find(package.path, installer_plugin_path, 1, true) then 65 if not string.find(package.cpath, installer_plugin_path, 1, true) then
66 package.cpath = package.cpath..lua_path_sep..installer_plugin_path..dir_sep.."lib"..sub_path.."?.so"; 66 package.cpath = package.cpath..lua_path_sep..installer_plugin_path..dir_sep.."lib"..sub_path.."?.so";
67 end 67 end
68 end 68 end
69 69
70 return path_util; 70 return path_util;