From fa5fa1bf6b8df533a60a8675b38ac547a7c0b34a Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Tue, 2 Jan 2018 13:18:29 -0200 Subject: When using --tree, prepend its package paths in wrappers. Fixes #740. --- CHANGELOG.md | 2 ++ src/luarocks/fs/unix.lua | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ecb336d..6d028713 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ What's new in LuaRocks 3.0 This adds support for easily requesting `dev` modules from LuaRocks.org, as in: `luarocks install --dev luafilesystem`. The list of URLs configured in `rocks_servers` is prepended with a list containing "/dev" in their paths. +* Wrappers installed using `--tree` now prepend the tree's prefix to their + package paths. Rockspec 3.0 ------------ diff --git a/src/luarocks/fs/unix.lua b/src/luarocks/fs/unix.lua index daa60c15..52634246 100644 --- a/src/luarocks/fs/unix.lua +++ b/src/luarocks/fs/unix.lua @@ -70,7 +70,7 @@ function unix.wrap_script(file, dest, name, version) local base = dir.base_name(file) local wrapname = fs.is_dir(dest) and dest.."/"..base or dest - local lpath, lcpath = cfg.package_paths() + local lpath, lcpath = cfg.package_paths(cfg.root_dir) local wrapper = io.open(wrapname, "w") if not wrapper then return nil, "Could not open "..wrapname.." for writing." -- cgit v1.2.3-55-g6feb