mirror of
https://github.com/NixOS/nix
synced 2025-06-25 10:41:16 +02:00
Properly filter the stores according to their declared uriSchemes
When opening a store, only try the stores whose `uriSchemes()` include the current one
This commit is contained in:
parent
5895184df4
commit
7f103dcddd
10 changed files with 51 additions and 33 deletions
|
@ -18,6 +18,7 @@ private:
|
|||
public:
|
||||
|
||||
LocalBinaryCacheStore(
|
||||
[[maybe_unused]] const std::string scheme,
|
||||
const Path & binaryCacheDir,
|
||||
const Params & params)
|
||||
: StoreConfig(params)
|
||||
|
@ -35,7 +36,7 @@ public:
|
|||
return "file://" + binaryCacheDir;
|
||||
}
|
||||
|
||||
static std::vector<std::string> uriPrefixes();
|
||||
static std::set<std::string> uriSchemes();
|
||||
|
||||
protected:
|
||||
|
||||
|
@ -96,7 +97,7 @@ bool LocalBinaryCacheStore::fileExists(const std::string & path)
|
|||
return pathExists(binaryCacheDir + "/" + path);
|
||||
}
|
||||
|
||||
std::vector<std::string> LocalBinaryCacheStore::uriPrefixes()
|
||||
std::set<std::string> LocalBinaryCacheStore::uriSchemes()
|
||||
{
|
||||
if (getEnv("_NIX_FORCE_HTTP_BINARY_CACHE_STORE") == "1")
|
||||
return {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue