@@ -256,7 +256,7 @@ static void check_output(properties_t const &properties, options_t *options)
256256{
257257 auto const output = properties.get_string (" output" , " pgsql" );
258258
259- if (! options->output_backend_set ) {
259+ if (options->output_backend . empty () ) {
260260 options->output_backend = output;
261261 log_info (" Using output '{}' (same as on import)." , output);
262262 return ;
@@ -334,8 +334,12 @@ static void check_for_nodes_table(options_t const &options)
334334 }
335335}
336336
337- static void check_and_set_style (options_t *options)
337+ static void set_option_defaults (options_t *options)
338338{
339+ if (options->output_backend .empty ()) {
340+ options->output_backend = " pgsql" ;
341+ }
342+
339343 if (options->style .empty ()) {
340344 if (options->output_backend == " flex" ||
341345 options->output_backend == " gazetteer" ) {
@@ -375,7 +379,7 @@ int main(int argc, char *argv[])
375379 if (properties.load ()) {
376380 check_and_update_properties (&properties, &options);
377381 } else {
378- check_and_set_style (&options);
382+ set_option_defaults (&options);
379383 check_for_nodes_table (options);
380384 }
381385
@@ -393,7 +397,7 @@ int main(int argc, char *argv[])
393397 }
394398 }
395399 } else {
396- check_and_set_style (&options);
400+ set_option_defaults (&options);
397401 store_properties (&properties, options);
398402 auto const finfo = run (options);
399403 store_data_properties (&properties, finfo);
0 commit comments