nix-store --serve: Don't fail if asked for info about non-valid path

Signed-off-by: Shea Levy <shea@shealevy.com>
This commit is contained in:
Shea Levy 2014-02-07 15:29:32 -05:00
parent 9488447594
commit 188f96500b

View file

@ -269,6 +269,8 @@ void StoreAPI::serve(Source & in, Sink & out, bool sign)
} else if (cmd == "info") { } else if (cmd == "info") {
// !!! Maybe we want a queryPathInfos? // !!! Maybe we want a queryPathInfos?
foreach (PathSet::iterator, i, paths) { foreach (PathSet::iterator, i, paths) {
if (!isValidPath(*i))
continue;
ValidPathInfo info = queryPathInfo(*i); ValidPathInfo info = queryPathInfo(*i);
writeString(info.path, out); writeString(info.path, out);
writeString(info.deriver, out); writeString(info.deriver, out);