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

Allow empty config file in flex output #2200

Merged
merged 1 commit into from
Jun 16, 2024
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
3 changes: 1 addition & 2 deletions src/output-flex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1172,8 +1172,7 @@ output_flex_t::output_flex_t(std::shared_ptr<middle_query_t> const &mid,
}

if (m_tables->empty()) {
throw std::runtime_error{
"No tables defined in Lua config. Nothing to do!"};
log_warn("No output tables defined!");
}

// For backwards compatibility we add a "default" expire output to all
Expand Down
6 changes: 3 additions & 3 deletions tests/bdd/flex/lua-basics.feature
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ Feature: Flex output uses a Lua config file
print("stage=" .. osm2pgsql.stage)
print("Table=" .. type(osm2pgsql.Table))
"""
Then running osm2pgsql flex fails
And the error output contains
When running osm2pgsql flex
Then the error output contains
"""
No tables defined in Lua config. Nothing to do!
No output tables defined
"""
And the standard output contains
"""
Expand Down
Loading