From c900a5c54439d358628540fbb697d41303b28d10 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 8 Nov 2019 19:25:57 +0100 Subject: util.paths: Don't treat path as pattern, fix traceback (thanks Menel87) --- util/paths.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'util/paths.lua') diff --git a/util/paths.lua b/util/paths.lua index c225108a..036f315a 100644 --- a/util/paths.lua +++ b/util/paths.lua @@ -48,11 +48,11 @@ function path_util.complement_lua_path(installer_plugin_path) local lua_path_sep = package.config:sub(3,3); local dir_sep = package.config:sub(1,1); local sub_path = dir_sep.."lua"..dir_sep..lua_version..dir_sep; - if not string.match(package.path, installer_plugin_path) then + if not string.find(package.path, installer_plugin_path, 1, true) then package.path = package.path..lua_path_sep..installer_plugin_path..dir_sep.."share"..sub_path.."?.lua"; package.path = package.path..lua_path_sep..installer_plugin_path..dir_sep.."share"..sub_path.."?"..dir_sep.."init.lua"; end - if not string.match(package.path, installer_plugin_path) then + if not string.find(package.path, installer_plugin_path, 1, true) then package.cpath = package.cpath..lua_path_sep..installer_plugin_path..dir_sep.."lib"..sub_path.."?.so"; end end -- cgit v1.2.3