#1003 luarocks module reorganization breaks prosodyctl about
Reporter
Zash
Owner
Zash
Created
Updated
Stars
★ (1)
Tags
Status-Fixed
Milestone-0.11
Type-Defect
Difficulty-VeryEasy
Priority-Medium
Zash
on
What steps will reproduce the problem?
1. Install luarocks from source
2. Run prosodyctl about
What is the expected output?
LuaRocks: Installed (scm)
What do you see instead?
lua: ./prosodyctl:596: attempt to index field 'luarocks.cfg' (a nil value)
stack traceback:
./prosodyctl:596: in function '?'
./prosodyctl:1523: in main chunk
[C]: in ?
Please provide any additional information below.
This was introduced in luarocks commit f2beb5ee1fd2c54d59a43f4f2a8fe0f7a1701daa according to bisect.
Using require instead of indexing package.loaded to reach luarocks.cfg appears to work.
What steps will reproduce the problem? 1. Install luarocks from source 2. Run prosodyctl about What is the expected output? LuaRocks: Installed (scm) What do you see instead? lua: ./prosodyctl:596: attempt to index field 'luarocks.cfg' (a nil value) stack traceback: ./prosodyctl:596: in function '?' ./prosodyctl:1523: in main chunk [C]: in ? Please provide any additional information below. This was introduced in luarocks commit f2beb5ee1fd2c54d59a43f4f2a8fe0f7a1701daa according to bisect. Using require instead of indexing package.loaded to reach luarocks.cfg appears to work.
LuaRocks might be gaining a proper API providing this info. If this lands, we should use it. https://github.com/luarocks/luarocks/issues/747 https://github.com/luarocks/luarocks/pull/748
Attempted fix in https://hg.prosody.im/trunk/rev/b7a22baaf55f
Changes