From d2991be0d3c03ecc953e9d80a90698397492e215 Mon Sep 17 00:00:00 2001 From: mpeterv Date: Thu, 11 Feb 2016 15:22:19 +0300 Subject: Remove a redundant check in new_version The template rockspec is type checked, no need to check if source table is present. --- src/luarocks/new_version.lua | 3 --- 1 file changed, 3 deletions(-) (limited to 'src') 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) if new_ver == old_ver then return true end - if not out_rs.source then - return nil, "'source' table is missing. Invalid rockspec?" - end if out_rs.source.dir then try_replace(out_rs.source, "dir", old_ver, new_ver) end -- cgit v1.2.3-55-g6feb