diff options
author | Hisham <hisham@gobolinux.org> | 2016-10-25 16:43:18 -0200 |
---|---|---|
committer | Hisham <hisham@gobolinux.org> | 2016-10-25 16:43:18 -0200 |
commit | 518e3b4f49f95a345d5f93600c85ce61b0f9fc41 (patch) | |
tree | ba118f0e86873a707c12363af4ec101da5e9587d /src | |
parent | 93f6b42794d864725fbe381425da7db9de95e766 (diff) | |
download | luarocks-518e3b4f49f95a345d5f93600c85ce61b0f9fc41.tar.gz luarocks-518e3b4f49f95a345d5f93600c85ce61b0f9fc41.tar.bz2 luarocks-518e3b4f49f95a345d5f93600c85ce61b0f9fc41.zip |
Check rockspec_version before running type check.
Diffstat (limited to 'src')
-rw-r--r-- | src/luarocks/fetch.lua | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/luarocks/fetch.lua b/src/luarocks/fetch.lua index 37db78f4..d03de1c6 100644 --- a/src/luarocks/fetch.lua +++ b/src/luarocks/fetch.lua | |||
@@ -196,6 +196,12 @@ function fetch.load_local_rockspec(filename, quick) | |||
196 | end | 196 | end |
197 | local globals = err | 197 | local globals = err |
198 | 198 | ||
199 | if rockspec.rockspec_format then | ||
200 | if deps.compare_versions(rockspec.rockspec_format, type_check.rockspec_format) then | ||
201 | return nil, "Rockspec format "..rockspec.rockspec_format.." is not supported, please upgrade LuaRocks." | ||
202 | end | ||
203 | end | ||
204 | |||
199 | if not quick then | 205 | if not quick then |
200 | local ok, err = type_check.type_check_rockspec(rockspec, globals) | 206 | local ok, err = type_check.type_check_rockspec(rockspec, globals) |
201 | if not ok then | 207 | if not ok then |
@@ -203,11 +209,6 @@ function fetch.load_local_rockspec(filename, quick) | |||
203 | end | 209 | end |
204 | end | 210 | end |
205 | 211 | ||
206 | if rockspec.rockspec_format then | ||
207 | if deps.compare_versions(rockspec.rockspec_format, type_check.rockspec_format) then | ||
208 | return nil, "Rockspec format "..rockspec.rockspec_format.." is not supported, please upgrade LuaRocks." | ||
209 | end | ||
210 | end | ||
211 | rockspec.format_is_at_least = deps.format_is_at_least | 212 | rockspec.format_is_at_least = deps.format_is_at_least |
212 | 213 | ||
213 | util.platform_overrides(rockspec.build) | 214 | util.platform_overrides(rockspec.build) |