Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

valhalla_run_route was missing config logic. #3824

Merged
merged 2 commits into from
Nov 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## Release Date: 2022-??-?? Valhalla 3.2.1
* **Removed**
* **Bug Fix**
* FIXED: valhalla_run_route was missing config logic.[#3824](https://github.com/valhalla/valhalla/pull/3824)
* **Enhancement**

## Release Date: 2022-10-26 Valhalla 3.2.0
Expand Down
9 changes: 9 additions & 0 deletions src/valhalla_run_route.cc
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,8 @@ valhalla::DirectionsLeg DirectionsTest(valhalla::Api& api,
int main(int argc, char* argv[]) {
// args
std::string json_str, json_file, config;
filesystem::path config_file_path;

boost::property_tree::ptree pt;
bool match_test, verbose_lanes;
bool multi_run = false;
Expand Down Expand Up @@ -509,6 +511,13 @@ int main(int argc, char* argv[]) {
}

// parse the config
if (result.count("config") &&
filesystem::is_regular_file(config_file_path =
filesystem::path(result["config"].as<std::string>()))) {
config = config_file_path.string();
} else {
std::cerr << "Configuration file is required\n\n" << options.help() << "\n\n";
}
rapidjson::read_json(config.c_str(), pt);

// configure logging
Expand Down