diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2018-01-02 13:18:29 -0200 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2018-01-02 13:18:29 -0200 |
commit | fa5fa1bf6b8df533a60a8675b38ac547a7c0b34a (patch) | |
tree | beb880adcc5dd527ae715278c00a39263dbf233c | |
parent | 210741e525d5a1663f8ac52e8845dea2739f4724 (diff) | |
download | luarocks-fa5fa1bf6b8df533a60a8675b38ac547a7c0b34a.tar.gz luarocks-fa5fa1bf6b8df533a60a8675b38ac547a7c0b34a.tar.bz2 luarocks-fa5fa1bf6b8df533a60a8675b38ac547a7c0b34a.zip |
When using --tree, prepend its package paths in wrappers.
Fixes #740.
-rw-r--r-- | CHANGELOG.md | 2 | ||||
-rw-r--r-- | src/luarocks/fs/unix.lua | 2 |
2 files changed, 3 insertions, 1 deletions
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 | |||
10 | This adds support for easily requesting `dev` modules from LuaRocks.org, as in: | 10 | This adds support for easily requesting `dev` modules from LuaRocks.org, as in: |
11 | `luarocks install --dev luafilesystem`. The list of URLs configured | 11 | `luarocks install --dev luafilesystem`. The list of URLs configured |
12 | in `rocks_servers` is prepended with a list containing "/dev" in their paths. | 12 | in `rocks_servers` is prepended with a list containing "/dev" in their paths. |
13 | * Wrappers installed using `--tree` now prepend the tree's prefix to their | ||
14 | package paths. | ||
13 | 15 | ||
14 | Rockspec 3.0 | 16 | Rockspec 3.0 |
15 | ------------ | 17 | ------------ |
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) | |||
70 | 70 | ||
71 | local base = dir.base_name(file) | 71 | local base = dir.base_name(file) |
72 | local wrapname = fs.is_dir(dest) and dest.."/"..base or dest | 72 | local wrapname = fs.is_dir(dest) and dest.."/"..base or dest |
73 | local lpath, lcpath = cfg.package_paths() | 73 | local lpath, lcpath = cfg.package_paths(cfg.root_dir) |
74 | local wrapper = io.open(wrapname, "w") | 74 | local wrapper = io.open(wrapname, "w") |
75 | if not wrapper then | 75 | if not wrapper then |
76 | return nil, "Could not open "..wrapname.." for writing." | 76 | return nil, "Could not open "..wrapname.." for writing." |