diff options
| author | mpeterv <mpeterval@gmail.com> | 2016-02-11 15:22:19 +0300 |
|---|---|---|
| committer | mpeterv <mpeterval@gmail.com> | 2016-02-11 15:22:19 +0300 |
| commit | d2991be0d3c03ecc953e9d80a90698397492e215 (patch) | |
| tree | 3848ca4784d4070ff1244a11c02e0bbe714722f8 | |
| parent | 0f2594e63e175946115bf725cb6b52bc807d4216 (diff) | |
| download | luarocks-d2991be0d3c03ecc953e9d80a90698397492e215.tar.gz luarocks-d2991be0d3c03ecc953e9d80a90698397492e215.tar.bz2 luarocks-d2991be0d3c03ecc953e9d80a90698397492e215.zip | |
Remove a redundant check in new_version
The template rockspec is type checked, no need to check
if source table is present.
| -rw-r--r-- | src/luarocks/new_version.lua | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/luarocks/new_version.lua b/src/luarocks/new_version.lua index e5469295..73accf1e 100644 --- a/src/luarocks/new_version.lua +++ b/src/luarocks/new_version.lua | |||
| @@ -77,9 +77,6 @@ local function update_source_section(out_rs, out_name, url, old_ver, new_ver) | |||
| 77 | if new_ver == old_ver then | 77 | if new_ver == old_ver then |
| 78 | return true | 78 | return true |
| 79 | end | 79 | end |
| 80 | if not out_rs.source then | ||
| 81 | return nil, "'source' table is missing. Invalid rockspec?" | ||
| 82 | end | ||
| 83 | if out_rs.source.dir then | 80 | if out_rs.source.dir then |
| 84 | try_replace(out_rs.source, "dir", old_ver, new_ver) | 81 | try_replace(out_rs.source, "dir", old_ver, new_ver) |
| 85 | end | 82 | end |
