On Sat, Mar 08, 2014 at 05:10:28PM -0500, Peter Colberg wrote:
> Could `luarocks path` be changed to respect the standard paths of the
> running interpreter? If I am not mistaken, the recommended way is
> to end LUA_PATH and LUA_CPATH with ';;'.

I looked at the code in path.lua,

      lr_path =  lr_path.. ";" .. package.path
      lr_cpath = lr_cpath .. ";" .. package.cpath

and realized that such a change would alter the behaviour in a
backwards-incompatible way. Currently `luarocks path` depends
on the existing environment (LUA_PATH, LUA_CPATH); using ";;"
the output would be independent of the environment.

> This would, e.g., allow using LuaJIT with a luarocks installation
> that is configured for standard Lua, which is the case with at least
> one major GNU/Linux distribution (Debian).

This work-around has the same effect without any changes:

eval `luajit /usr/bin/luarocks path`

Peter

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Luarocks-developers mailing list
Luarocks-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/luarocks-developers

Reply via email to