|
|
|
@ -8,7 +8,10 @@ using fmt::format; |
|
|
|
|
std::filesystem::path Config::BASE_DIR{"."}; |
|
|
|
|
|
|
|
|
|
Config::Config(const std::string src_path) : $src_path(src_path) { |
|
|
|
|
std::ifstream infile(Config::path_to($src_path)); |
|
|
|
|
auto path_to = Config::path_to($src_path); |
|
|
|
|
dbc::check(std::filesystem::exists(path_to), |
|
|
|
|
fmt::format("requested config file {} doesn't exist", path_to.string())); |
|
|
|
|
std::ifstream infile(path_to); |
|
|
|
|
$config = json::parse(infile); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|