| catalog_path_flag(args::Group& cmd) | catalog_path_flag(args::Group& cmd) | ||||
| : path_flag(cmd, | : path_flag(cmd, | ||||
| "catalog-path", | "catalog-path", | ||||
| "Path to the catalog database", | |||||
| "Override the path to the catalog database", | |||||
| {"catalog", 'c'}, | {"catalog", 'c'}, | ||||
| args::Options::Required) {} | |||||
| dds::dds_data_dir() / "catalog.db") {} | |||||
| }; | }; | ||||
| struct { | struct { | ||||
| int run() { | int run() { | ||||
| auto cat = dds::catalog::open(path.Get()); | auto cat = dds::catalog::open(path.Get()); | ||||
| for (const auto& req : requirements.Get()) { | for (const auto& req : requirements.Get()) { | ||||
| auto id = dds::package_id::parse(req); | |||||
| auto id = dds::package_id::parse(req); | |||||
| auto info = cat.get(id); | auto info = cat.get(id); | ||||
| if (!info) { | if (!info) { | ||||
| throw std::runtime_error( | throw std::runtime_error( |