mirror of
https://github.com/NixOS/nix
synced 2025-07-02 21:51:50 +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
|
@ -22,7 +22,7 @@ class SSHStore : public virtual RemoteStore, public virtual SSHStoreConfig
|
|||
{
|
||||
public:
|
||||
|
||||
SSHStore(const std::string & host, const Params & params)
|
||||
SSHStore([[maybe_unused]] const std::string & scheme, const std::string & host, const Params & params)
|
||||
: StoreConfig(params)
|
||||
, Store(params)
|
||||
, RemoteStoreConfig(params)
|
||||
|
@ -38,11 +38,11 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
static std::vector<std::string> uriPrefixes() { return {"ssh-ng"}; }
|
||||
static std::set<std::string> uriSchemes() { return {"ssh-ng"}; }
|
||||
|
||||
std::string getUri() override
|
||||
{
|
||||
return uriPrefixes()[0] + "://" + host;
|
||||
return *uriSchemes().begin() + "://" + host;
|
||||
}
|
||||
|
||||
bool sameMachine() override
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue