diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2018-06-20 14:22:22 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2018-07-01 15:51:13 -0300 |
commit | 73bb24caafa90b03744451590eebf24d357f9a2e (patch) | |
tree | 092fe40c98b09fe4a4bdbcbc184f013af44fac48 | |
parent | b51e98582dd8b59a15bd0dcbf469c05d01c3e045 (diff) | |
download | luarocks-73bb24caafa90b03744451590eebf24d357f9a2e.tar.gz luarocks-73bb24caafa90b03744451590eebf24d357f9a2e.tar.bz2 luarocks-73bb24caafa90b03744451590eebf24d357f9a2e.zip |
cmd, Tests: ensure versioned directory is tried first
-rw-r--r-- | spec/util/test_env.lua | 4 | ||||
-rw-r--r-- | src/luarocks/cmd.lua | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/spec/util/test_env.lua b/spec/util/test_env.lua index 269a1cfc..ed97973a 100644 --- a/spec/util/test_env.lua +++ b/spec/util/test_env.lua | |||
@@ -744,9 +744,9 @@ local function install_luarocks(install_env_vars) | |||
744 | assert(execute_bool("install.bat /LUA " .. testing_paths.luadir .. " " .. compiler_flag .. " /P " .. testing_paths.testing_lrprefix .. " /NOREG /NOADMIN /F /Q /CONFIG " .. testing_paths.testing_lrprefix .. "/etc/luarocks", false, install_env_vars)) | 744 | assert(execute_bool("install.bat /LUA " .. testing_paths.luadir .. " " .. compiler_flag .. " /P " .. testing_paths.testing_lrprefix .. " /NOREG /NOADMIN /F /Q /CONFIG " .. testing_paths.testing_lrprefix .. "/etc/luarocks", false, install_env_vars)) |
745 | assert(execute_bool(testing_paths.win_tools .. "/cp " .. testing_paths.testing_lrprefix .. "/lua/luarocks/core/site_config* " .. testing_paths.src_dir .. "/luarocks/core")) | 745 | assert(execute_bool(testing_paths.win_tools .. "/cp " .. testing_paths.testing_lrprefix .. "/lua/luarocks/core/site_config* " .. testing_paths.src_dir .. "/luarocks/core")) |
746 | else | 746 | else |
747 | local incfile = test_env.file_if_exists(testing_paths.luadir .. "/include/lua.h") | 747 | local incfile = test_env.file_if_exists(testing_paths.luadir .. "/include/lua/" .. test_env.lua_version .. "/lua.h") |
748 | or test_env.file_if_exists(testing_paths.luadir .. "/include/lua/" .. test_env.lua_version .. "/lua.h") | ||
749 | or test_env.file_if_exists(testing_paths.luadir .. "/include/lua" .. test_env.lua_version .. "/lua.h") | 748 | or test_env.file_if_exists(testing_paths.luadir .. "/include/lua" .. test_env.lua_version .. "/lua.h") |
749 | or test_env.file_if_exists(testing_paths.luadir .. "/include/lua.h") | ||
750 | local incdir = assert(incfile):gsub("/lua.h$", "") | 750 | local incdir = assert(incfile):gsub("/lua.h$", "") |
751 | 751 | ||
752 | local lines = { | 752 | local lines = { |
diff --git a/src/luarocks/cmd.lua b/src/luarocks/cmd.lua index da78c224..813587e0 100644 --- a/src/luarocks/cmd.lua +++ b/src/luarocks/cmd.lua | |||
@@ -111,9 +111,9 @@ do | |||
111 | local function find_lua_incdir(prefix, luaver, luajitver) | 111 | local function find_lua_incdir(prefix, luaver, luajitver) |
112 | luajitver = luajitver and luajitver:gsub("%-.*", "") | 112 | luajitver = luajitver and luajitver:gsub("%-.*", "") |
113 | local incdirs = { | 113 | local incdirs = { |
114 | prefix .. "/include", | ||
115 | prefix .. "/include/lua/" .. luaver, | 114 | prefix .. "/include/lua/" .. luaver, |
116 | prefix .. "/include/lua" .. luaver, | 115 | prefix .. "/include/lua" .. luaver, |
116 | prefix .. "/include", | ||
117 | prefix, | 117 | prefix, |
118 | luajitver and prefix .. "/include/luajit-" .. luajitver, | 118 | luajitver and prefix .. "/include/luajit-" .. luajitver, |
119 | } | 119 | } |