mirror of
https://github.com/valitydev/osquery-1.git
synced 2024-11-07 09:58:54 +00:00
parent
6dec11fd41
commit
62beb1e547
@ -486,14 +486,19 @@ Status Config::genPack(const std::string& name,
|
||||
|
||||
try {
|
||||
auto clone = response[0][name];
|
||||
if (clone == "") {
|
||||
LOG(WARNING) << "Error reading the query pack named: " << name;
|
||||
return Status(0);
|
||||
}
|
||||
stripConfigComments(clone);
|
||||
pt::ptree pack_tree;
|
||||
std::stringstream pack_stream;
|
||||
pack_stream << clone;
|
||||
pt::read_json(pack_stream, pack_tree);
|
||||
addPack(name, source, pack_tree);
|
||||
} catch (const pt::json_parser::json_parser_error& /* e */) {
|
||||
LOG(WARNING) << "Error parsing the pack JSON: " << name;
|
||||
} catch (const pt::json_parser::json_parser_error& e) {
|
||||
LOG(WARNING) << "Error parsing the \"" << name
|
||||
<< "\" pack JSON: " << e.what();
|
||||
}
|
||||
return Status(0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user