summaryrefslogtreecommitdiff
path: root/src/other_tools/just_mr/setup_utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/other_tools/just_mr/setup_utils.cpp')
-rw-r--r--src/other_tools/just_mr/setup_utils.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/other_tools/just_mr/setup_utils.cpp b/src/other_tools/just_mr/setup_utils.cpp
index 839b47a3..9eaa2e86 100644
--- a/src/other_tools/just_mr/setup_utils.cpp
+++ b/src/other_tools/just_mr/setup_utils.cpp
@@ -216,10 +216,12 @@ auto ReadConfiguration(
for (auto const& [key, val] : repos.items()) {
new_repos[key] = val;
auto ws = val.value("repository", nlohmann::json::object());
- auto pragma = ws.value("pragma", nlohmann::json::object());
- pragma["absent"] = absent_set.contains(key);
- ws["pragma"] = pragma;
- new_repos[key]["repository"] = ws;
+ if (ws.is_object()) {
+ auto pragma = ws.value("pragma", nlohmann::json::object());
+ pragma["absent"] = absent_set.contains(key);
+ ws["pragma"] = pragma;
+ new_repos[key]["repository"] = ws;
+ }
}
config["repositories"] = new_repos;
} catch (std::exception const& e) {