From cc76ce062f587b8a2ce6f34ca7ad57c585b82117 Mon Sep 17 00:00:00 2001 From: Hisham Date: Tue, 25 Oct 2016 16:43:18 -0200 Subject: Check rockspec_version before running type check. --- src/luarocks/fetch.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/luarocks/fetch.lua b/src/luarocks/fetch.lua index 824a3731..76f366cd 100644 --- a/src/luarocks/fetch.lua +++ b/src/luarocks/fetch.lua @@ -197,18 +197,18 @@ function fetch.load_local_rockspec(filename, quick) end local globals = err + if rockspec.rockspec_format then + if deps.compare_versions(rockspec.rockspec_format, type_check.rockspec_format) then + return nil, "Rockspec format "..rockspec.rockspec_format.." is not supported, please upgrade LuaRocks." + end + end + if not quick then local ok, err = type_check.type_check_rockspec(rockspec, globals) if not ok then return nil, filename..": "..err end end - - if rockspec.rockspec_format then - if deps.compare_versions(rockspec.rockspec_format, type_check.rockspec_format) then - return nil, "Rockspec format "..rockspec.rockspec_format.." is not supported, please upgrade LuaRocks." - end - end util.platform_overrides(rockspec.build) util.platform_overrides(rockspec.dependencies) -- cgit v1.2.3-55-g6feb