diff options
author | Hisham <hisham@gobolinux.org> | 2016-10-25 16:43:18 -0200 |
---|---|---|
committer | Hisham <hisham@gobolinux.org> | 2016-10-25 16:45:20 -0200 |
commit | cc76ce062f587b8a2ce6f34ca7ad57c585b82117 (patch) | |
tree | 76e0e0955b1450a598079b368fbae4c89aed2463 | |
parent | 1a9389f0687017430c84ade3252f46ac4b77a738 (diff) | |
download | luarocks-cc76ce062f587b8a2ce6f34ca7ad57c585b82117.tar.gz luarocks-cc76ce062f587b8a2ce6f34ca7ad57c585b82117.tar.bz2 luarocks-cc76ce062f587b8a2ce6f34ca7ad57c585b82117.zip |
Check rockspec_version before running type check.
-rw-r--r-- | src/luarocks/fetch.lua | 12 |
1 files changed, 6 insertions, 6 deletions
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) | |||
197 | end | 197 | end |
198 | local globals = err | 198 | local globals = err |
199 | 199 | ||
200 | if rockspec.rockspec_format then | ||
201 | if deps.compare_versions(rockspec.rockspec_format, type_check.rockspec_format) then | ||
202 | return nil, "Rockspec format "..rockspec.rockspec_format.." is not supported, please upgrade LuaRocks." | ||
203 | end | ||
204 | end | ||
205 | |||
200 | if not quick then | 206 | if not quick then |
201 | local ok, err = type_check.type_check_rockspec(rockspec, globals) | 207 | local ok, err = type_check.type_check_rockspec(rockspec, globals) |
202 | if not ok then | 208 | if not ok then |
203 | return nil, filename..": "..err | 209 | return nil, filename..": "..err |
204 | end | 210 | end |
205 | end | 211 | end |
206 | |||
207 | if rockspec.rockspec_format then | ||
208 | if deps.compare_versions(rockspec.rockspec_format, type_check.rockspec_format) then | ||
209 | return nil, "Rockspec format "..rockspec.rockspec_format.." is not supported, please upgrade LuaRocks." | ||
210 | end | ||
211 | end | ||
212 | 212 | ||
213 | util.platform_overrides(rockspec.build) | 213 | util.platform_overrides(rockspec.build) |
214 | util.platform_overrides(rockspec.dependencies) | 214 | util.platform_overrides(rockspec.dependencies) |