getDefaultSubstituters(): Skip broken substituters

Fixes #1340.
This commit is contained in:
Eelco Dolstra 2018-02-09 14:36:38 +01:00
parent 3d2d207aad
commit aa02cdc33c
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE

View file

@ -896,7 +896,11 @@ std::list<ref<Store>> getDefaultSubstituters()
auto addStore = [&](const std::string & uri) { auto addStore = [&](const std::string & uri) {
if (done.count(uri)) return; if (done.count(uri)) return;
done.insert(uri); done.insert(uri);
try {
stores.push_back(openStore(uri)); stores.push_back(openStore(uri));
} catch (Error & e) {
printError("warning: %s", e.what());
}
}; };
for (auto uri : settings.substituters.get()) for (auto uri : settings.substituters.get())