diff options
| author | Hisham Muhammad <hisham@gobolinux.org> | 2018-09-25 18:32:54 -0400 |
|---|---|---|
| committer | Hisham Muhammad <hisham@gobolinux.org> | 2018-09-25 23:32:31 -0400 |
| commit | fa465f2bfd3641bbffccc70b2ded331ee6ab1766 (patch) | |
| tree | d37f83844a484908ebd4fbb59fece2aac74b68f1 /src | |
| parent | d221d4df39bd614924515901f56ab2c7aa59dc2b (diff) | |
| download | luarocks-fa465f2bfd3641bbffccc70b2ded331ee6ab1766.tar.gz luarocks-fa465f2bfd3641bbffccc70b2ded331ee6ab1766.tar.bz2 luarocks-fa465f2bfd3641bbffccc70b2ded331ee6ab1766.zip | |
write_rockspec: fix representation of Lua version dependency
The Lua version dependency specified with --lua-versions
was using the internal table format. This commit ensures that
it is stored in rockspecs using the string format.
Includes a regression test.
Diffstat (limited to 'src')
| -rw-r--r-- | src/luarocks/cmd/write_rockspec.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/luarocks/cmd/write_rockspec.lua b/src/luarocks/cmd/write_rockspec.lua index 4a8a997e..aad91910 100644 --- a/src/luarocks/cmd/write_rockspec.lua +++ b/src/luarocks/cmd/write_rockspec.lua | |||
| @@ -220,6 +220,13 @@ local function rockspec_cleanup(rockspec) | |||
| 220 | rockspec[list] = nil | 220 | rockspec[list] = nil |
| 221 | end | 221 | end |
| 222 | end | 222 | end |
| 223 | for _, list in ipairs({"dependencies", "build_dependencies", "test_dependencies"}) do | ||
| 224 | if rockspec[list] then | ||
| 225 | for i, entry in ipairs(rockspec[list]) do | ||
| 226 | rockspec[list][i] = tostring(entry) | ||
| 227 | end | ||
| 228 | end | ||
| 229 | end | ||
| 223 | end | 230 | end |
| 224 | 231 | ||
| 225 | function write_rockspec.command(flags, name, version, url_or_dir) | 232 | function write_rockspec.command(flags, name, version, url_or_dir) |
