Merge pull request #233 from Jeff-Ciesielski/jeffc/infinite_search_loop

Fix infinitely recursive "update package lists?" prompt
This commit is contained in:
Dominik Picheta 2016-06-03 13:28:04 +01:00
commit 0da746029e

View file

@ -524,7 +524,11 @@ proc getDownloadInfo*(pv: PkgTuple, options: Options,
options.prompt(pv.name & " not found in any local packages.json, " &
"check internet for updated packages?"):
update(options)
return getDownloadInfo(pv, options, doPrompt)
# Once we've updated, try again, but don't prompt if not found
# (as we've already updated and a failure means it really
# isn't there)
return getDownloadInfo(pv, options, false)
else:
raise newException(NimbleError, "Package not found.")