Skip to content

Commit

Permalink
Merge pull request #2200 from joto/allow-empty-config
Browse files Browse the repository at this point in the history
Allow empty config file in flex output
  • Loading branch information
lonvia authored Jun 16, 2024
2 parents 40ef1a6 + e7ed8d0 commit 03eedd4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
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

0 comments on commit 03eedd4

Please sign in to comment.