From 86ba23c8a52a37dce829e3fa8b21f32fbb45a6a3 Mon Sep 17 00:00:00 2001 From: mpeterv Date: Tue, 23 Sep 2014 21:59:58 +0400 Subject: Fix `luarocks lint`. Now it does not crash on rockspecs with malformed version. --- src/luarocks/type_check.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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) end if typetbl._pattern then if not item:match("^"..typetbl._pattern.."$") then - return nil, "Type mismatch on field "..context..": invalid value "..item.." does not match '"..expected.."'" + return nil, "Type mismatch on field "..context..": invalid value "..item.." does not match '"..typetbl._pattern.."'" end end elseif expected_type == "table" then -- cgit v1.2.3-55-g6feb