Verified Commit b2b4d831 authored by Karel Koci's avatar Karel Koci 🤘

planner: do not fail if non-existent repository is requested

If package was limited to non-existend repository than this specific
line was failing with nil indexing. This now instead of failure reports
warnings and continues.
parent b9566006
......@@ -48,7 +48,12 @@ function candidates_choose(candidates, pkg_name, version, repository)
for _, repo in pairs(repository or {}) do
assert(type(repo) == 'string' or type(repo) == 'table')
if type(repo) == 'string' then
repos[requests.known_repositories[repo]] = true
local rp = requests.known_repositories[repo]
if rp then
repos[rp] = true
WARN("Package " .. pkg_name .. " limit to non-existent repository " .. repo .. " is ignored.")
repos[repo] = true
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment