mirror of
https://github.com/NixOS/nix.git
synced 2024-11-29 18:22:27 +00:00
Make nix describe-stores
functional
Using the `*Config` class hierarchy
This commit is contained in:
parent
22afa8fb4d
commit
dae39f0a7a
@ -20,7 +20,11 @@ struct CmdDescribeStores : Command, MixJSON
|
||||
{
|
||||
|
||||
if (json) {
|
||||
auto availableStores = *implementations;
|
||||
auto res = nlohmann::json::array();
|
||||
for (auto & implem : *Implementations::registered) {
|
||||
auto storeConfig = implem.getConfig();
|
||||
std::cout << storeConfig->toJSON().dump() << std::endl;
|
||||
}
|
||||
} else {
|
||||
throw Error("Only json is available for describe-stores");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user