diff options
author | Hisham <hisham@gobolinux.org> | 2016-10-05 03:18:26 -0300 |
---|---|---|
committer | Hisham <hisham@gobolinux.org> | 2016-10-05 03:18:26 -0300 |
commit | 34963cbc145f9ea1521c24919a9c2c38ee24a7d8 (patch) | |
tree | 34b8d7ab83741db5d1030e490b947a59fbbf64d1 /spec | |
parent | 87f2b81d3bf95e9c3bd99b1c09a8260c90a07d3b (diff) | |
download | luarocks-34963cbc145f9ea1521c24919a9c2c38ee24a7d8.tar.gz luarocks-34963cbc145f9ea1521c24919a9c2c38ee24a7d8.tar.bz2 luarocks-34963cbc145f9ea1521c24919a9c2c38ee24a7d8.zip |
Simulate module() for older wrappers.
Older versions of LuaRocks (e.g. 2.1.0) install script wrappers
that assume that `luarocks.loader` is available in the global
namespace (this is from the module() era). This workaround detects
this (because site_config.lua files written by these old versions
use module(), and therefore create a `luarocks` global.
To reproduce this issue, make a clean install of LuaRocks 2.1.0,
then run `luarocks install luarocks`. Installation succeds,
but running `luarocks` produces `attempt to index field 'loader'
(a nil value)`.
Bug reported by @tomasguisasola.
Diffstat (limited to 'spec')
0 files changed, 0 insertions, 0 deletions