What steps will reproduce the problem?
--------------------------------------------------------------------------
1. Replace the luarocks v2.0.2 in the LuaForWindows v5.1.4-40 with the luarocks
package v2.0.4 found on http://luarocks.org/releases/luarocks-2.0.4.tar.gz
(adds 2 lines in luarocks.lua and 1 line in luarocks-admin.lua, while replacing
everything in the Lua/5.1/luarocks/ directory with the files in the respective
luarocks/ in the luarocks v2.0.4 archive)
2. Try out luarocks in the command line. example: E:\>luarocks install xavante
3. Get an error.
What is the expected output? What do you see instead?
--------------------------------------------------------------------------
I was expecting that the 'xavante' rock would install without any problems.
I got this instead:
Error: LuaRocks 2.0.4 bug (please report at
luarocks-developers@lists.luaforge.net).
E:\Lua\5.1\lua/luarocks\fs\lua.lua:623: attempt to concatenate local 'root_dir'
(a nil value)
stack traceback:
E:\Lua\5.1\lua/luarocks\fs\lua.lua:623: in function 'check_command_permissions'
E:\Lua\5.1\lua/luarocks\install.lua:111: in function <E:\Lua\5.1\lua/luarocks\install.lua:105>
(tail call): ?
[C]: in function 'xpcall'
E:\lua\5.1\lua\luarocks\command_line.lua:143: in function 'run_command'
E:\Lua\5.1\luarocks.lua:22: in main chunk
[C]: ?
What version of the product are you using? On what operating system?
--------------------------------------------------------------------------
LuaForWindows v5.1.4-40 on Windows 7 with Luarocks updated to v2.0.4 from the
included v2.0.2
Please provide any additional information below.
--------------------------------------------------------------------------
I went into the luarocks/fs/lua.lua and so that in the
'check_command_permissions' function there is not checking if the cfg.root_dir
is nil and that the function was supposed to fail and suggest running the
luarocks command with the --local option.
I tried 'E:\>luarocks install xavante --local' and it worked fine.
So I went into the luarocks.bat and replaced its contents with the following:
@ECHO OFF
SETLOCAL
lua "%LUA_DEV%\luarocks.lua" %* "--local"
ENDLOCAL
This makes the luarocks command to function properly.
Original issue reported on code.google.com by petsagou...@gmail.com on 2 Jan 2011 at 5:06
Original issue reported on code.google.com by
petsagou...@gmail.com
on 2 Jan 2011 at 5:06