lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Tue, Aug 17, 2010 at 6:20 PM, steve donovan
<steve.j.donovan@gmail.com> wrote:
> I'm having a look at the Git latest to see how best to get such a
> warning in. (With a --local option to force of course)

The issue is that _usually_ a person wants to install a rock globally,
if luarocks was installed with superuser privileges.

Here's a little patch that seems to do the job; it's for
luarocks/install.lua and comes just after the basic
argument-is-a-string check in run():

   if not flags["local"] and not
fs.is_writable(cfg.config.LUAROCKS_ROCKS_TREE) then
      return nil, "Must be a superuser to install rocks globally\nOr
you can install locally with --local"
   end

It should not interfere with local installations, although I haven't
tried this yet.

steve d.