aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2024-08-02 13:21:54 -0300
committerGitHub <noreply@github.com>2024-08-02 13:21:54 -0300
commit548f0ec4be3d10bf694f1885b39561f92a74b09b (patch)
treee908f61a172342a55cc2dc8c760cb58242dfed6b
parent3a142ce627a0f6af61c27643d6d19096395160a1 (diff)
downloadluarocks-548f0ec4be3d10bf694f1885b39561f92a74b09b.tar.gz
luarocks-548f0ec4be3d10bf694f1885b39561f92a74b09b.tar.bz2
luarocks-548f0ec4be3d10bf694f1885b39561f92a74b09b.zip
turn assertion failure into a consistency check (#1703)
-rw-r--r--src/luarocks/deps.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/luarocks/deps.lua b/src/luarocks/deps.lua
index 1cd500ca..344991f6 100644
--- a/src/luarocks/deps.lua
+++ b/src/luarocks/deps.lua
@@ -239,7 +239,9 @@ function deps.fulfill_dependency(dep, deps_mode, rocks_provided, verify, depskey
239 end 239 end
240 240
241 found, where = match_dep(dep, get_versions) 241 found, where = match_dep(dep, get_versions)
242 assert(found) 242 if not found then
243 return nil, "Repository inconsistency detected (previously unfinished/corrupted installation?)"
244 end
243 return true, found, where 245 return true, found, where
244end 246end
245 247