aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormpeterv <mpeterval@gmail.com>2014-09-23 21:59:58 +0400
committermpeterv <mpeterval@gmail.com>2014-09-23 21:59:58 +0400
commit86ba23c8a52a37dce829e3fa8b21f32fbb45a6a3 (patch)
tree0cade2e8b1b195efb33447d0371697f7bcfbd63b
parente5cd7a90d78f5ffb40d4e8ee6a2b6396d6aa574c (diff)
downloadluarocks-86ba23c8a52a37dce829e3fa8b21f32fbb45a6a3.tar.gz
luarocks-86ba23c8a52a37dce829e3fa8b21f32fbb45a6a3.tar.bz2
luarocks-86ba23c8a52a37dce829e3fa8b21f32fbb45a6a3.zip
Fix `luarocks lint`.
Now it does not crash on rockspecs with malformed version.
-rw-r--r--src/luarocks/type_check.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/luarocks/type_check.lua b/src/luarocks/type_check.lua
index 4adb7cf4..bc315214 100644
--- a/src/luarocks/type_check.lua
+++ b/src/luarocks/type_check.lua
@@ -216,7 +216,7 @@ local function type_check_item(version, item, typetbl, context)
216 end 216 end
217 if typetbl._pattern then 217 if typetbl._pattern then
218 if not item:match("^"..typetbl._pattern.."$") then 218 if not item:match("^"..typetbl._pattern.."$") then
219 return nil, "Type mismatch on field "..context..": invalid value "..item.." does not match '"..expected.."'" 219 return nil, "Type mismatch on field "..context..": invalid value "..item.." does not match '"..typetbl._pattern.."'"
220 end 220 end
221 end 221 end
222 elseif expected_type == "table" then 222 elseif expected_type == "table" then