mirror of
https://github.com/NixOS/nix.git
synced 2024-12-01 19:22:33 +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