From e58c4195c5a827cc9a53587364edfd04e9b316c4 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Tue, 14 Jan 2020 21:47:25 -0300 Subject: util: use native slashes --- src/luarocks/util.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/luarocks/util.lua b/src/luarocks/util.lua index 8eccace9..af63b79d 100644 --- a/src/luarocks/util.lua +++ b/src/luarocks/util.lua @@ -495,11 +495,11 @@ do end table.insert(names, "lua" .. exe_suffix) - local bindirs = { prefix .. "/bin", prefix } local tried = {} - for _, d in ipairs(bindirs) do + local dir_sep = package.config:sub(1, 1) + for _, d in ipairs({ prefix .. dir_sep .. "bin", prefix }) do for _, name in ipairs(names) do - local lua_exe = d .. "/" .. name + local lua_exe = d .. dir_sep .. name local is_wrapper, err = util.lua_is_wrapper(lua_exe) if is_wrapper == false then local lv = util.check_lua_version(lua_exe, luaver) -- cgit v1.2.3-55-g6feb