aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/luarocks/build.lua2
-rw-r--r--src/luarocks/type_check.lua4
2 files changed, 4 insertions, 2 deletions
diff --git a/src/luarocks/build.lua b/src/luarocks/build.lua
index 42ae3fd7..e9b3adc1 100644
--- a/src/luarocks/build.lua
+++ b/src/luarocks/build.lua
@@ -223,6 +223,8 @@ function build_rockspec(rockspec_file, need_to_fetch, minimal_mode, no_deps)
223 local dest = dir.path(path.install_dir(name, version), copy_dir) 223 local dest = dir.path(path.install_dir(name, version), copy_dir)
224 fs.make_dir(dest) 224 fs.make_dir(dest)
225 fs.copy_contents(copy_dir, dest) 225 fs.copy_contents(copy_dir, dest)
226 else
227 util.warning("Directory '"..copy_dir.."' not found")
226 end 228 end
227 end 229 end
228 230
diff --git a/src/luarocks/type_check.lua b/src/luarocks/type_check.lua
index 282198f6..28e6e7b9 100644
--- a/src/luarocks/type_check.lua
+++ b/src/luarocks/type_check.lua
@@ -172,8 +172,8 @@ local function type_check_item(name, item, expected, context)
172 return nil, "Type mismatch on field "..context..name..": expected a number" 172 return nil, "Type mismatch on field "..context..name..": expected a number"
173 end 173 end
174 elseif expected_type == "string" then 174 elseif expected_type == "string" then
175 if not tostring(item) then 175 if type(item) ~= "string" then
176 return nil, "Type mismatch on field "..context..name..": expected a value convertible to string" 176 return nil, "Type mismatch on field "..context..name..": expected a string"
177 end 177 end
178 if expected ~= "string" then 178 if expected ~= "string" then
179 if not item:match("^"..expected.."$") then 179 if not item:match("^"..expected.."$") then