aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2016-07-11 12:21:02 -0300
committerGitHub <noreply@github.com>2016-07-11 12:21:02 -0300
commit187f0dee0b77e1f09c9881ac63e4d8b2cd2fd9c8 (patch)
tree83762bacaa0efa9e12f22d998b708f13aa0436cb
parent994a041b4f1348564f390f3f4d8ec040c8edb4b8 (diff)
parent2a3eb136ec3542a70dab3cca1d432d8228cb29b1 (diff)
downloadluarocks-187f0dee0b77e1f09c9881ac63e4d8b2cd2fd9c8.tar.gz
luarocks-187f0dee0b77e1f09c9881ac63e4d8b2cd2fd9c8.tar.bz2
luarocks-187f0dee0b77e1f09c9881ac63e4d8b2cd2fd9c8.zip
Merge pull request #587 from xpol/win32-unique-paths-in-bin-scripts
Make package.path and package.cpath unique in win32 bin scripts.
-rw-r--r--src/luarocks/cfg.lua2
-rw-r--r--src/luarocks/fs/win32.lua2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/luarocks/cfg.lua b/src/luarocks/cfg.lua
index 9b1c5902..d58c7407 100644
--- a/src/luarocks/cfg.lua
+++ b/src/luarocks/cfg.lua
@@ -403,7 +403,7 @@ local defaults = {
403 403
404if cfg.platforms.windows then 404if cfg.platforms.windows then
405 local full_prefix = (site_config.LUAROCKS_PREFIX or (os.getenv("PROGRAMFILES")..[[\LuaRocks]])) 405 local full_prefix = (site_config.LUAROCKS_PREFIX or (os.getenv("PROGRAMFILES")..[[\LuaRocks]]))
406 extra_luarocks_module_dir = full_prefix.."\\lua\\?.lua" 406 extra_luarocks_module_dir = full_prefix.."/lua/?.lua"
407 407
408 home_config_file = home_config_file and home_config_file:gsub("\\","/") 408 home_config_file = home_config_file and home_config_file:gsub("\\","/")
409 defaults.fs_use_modules = false 409 defaults.fs_use_modules = false
diff --git a/src/luarocks/fs/win32.lua b/src/luarocks/fs/win32.lua
index 8debaeef..c99cc895 100644
--- a/src/luarocks/fs/win32.lua
+++ b/src/luarocks/fs/win32.lua
@@ -130,6 +130,8 @@ function win32.wrap_script(file, dest, name, version)
130 local wrapname = fs.is_dir(dest) and dest.."/"..base or dest 130 local wrapname = fs.is_dir(dest) and dest.."/"..base or dest
131 wrapname = wrapname..".bat" 131 wrapname = wrapname..".bat"
132 local lpath, lcpath = cfg.package_paths() 132 local lpath, lcpath = cfg.package_paths()
133 lpath = util.remove_path_dupes(lpath, ";")
134 lcpath = util.remove_path_dupes(lcpath, ";")
133 local wrapper = io.open(wrapname, "w") 135 local wrapper = io.open(wrapname, "w")
134 if not wrapper then 136 if not wrapper then
135 return nil, "Could not open "..wrapname.." for writing." 137 return nil, "Could not open "..wrapname.." for writing."