Skip to content

Commit 03eedd4

Browse files
authored
Merge pull request #2200 from joto/allow-empty-config
Allow empty config file in flex output
2 parents 40ef1a6 + e7ed8d0 commit 03eedd4

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/output-flex.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,8 +1172,7 @@ output_flex_t::output_flex_t(std::shared_ptr<middle_query_t> const &mid,
11721172
}
11731173

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

11791178
// For backwards compatibility we add a "default" expire output to all

tests/bdd/flex/lua-basics.feature

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ Feature: Flex output uses a Lua config file
99
print("stage=" .. osm2pgsql.stage)
1010
print("Table=" .. type(osm2pgsql.Table))
1111
"""
12-
Then running osm2pgsql flex fails
13-
And the error output contains
12+
When running osm2pgsql flex
13+
Then the error output contains
1414
"""
15-
No tables defined in Lua config. Nothing to do!
15+
No output tables defined
1616
"""
1717
And the standard output contains
1818
"""

0 commit comments

Comments
 (0)