Skip to content

Commit

Permalink
Merge pull request #2217 from joto/version-without-timestamp
Browse files Browse the repository at this point in the history
Do not print timestamp before the version when --version is used
  • Loading branch information
lonvia authored Aug 9, 2024
2 parents b2b5cc7 + 2449b29 commit 770083d
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/command-line-parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ void check_options_expire(options_t *options) {

void print_version()
{
fmt::print(stderr, "osm2pgsql version {}", get_osm2pgsql_version());
fmt::print(stderr, "Build: {}\n", get_build_type());
fmt::print(stderr, "Compiled using the following library versions:\n");
fmt::print(stderr, "Libosmium {}\n", LIBOSMIUM_VERSION_STRING);
Expand Down Expand Up @@ -609,17 +610,17 @@ options_t parse_command_line(int argc, char *argv[])
return options;
}

if (app.want_version()) {
options.command = command_t::version;
return options;
}

log_info("osm2pgsql version {}", get_osm2pgsql_version());

if (verbose) {
get_logger().set_level(log_level::debug);
}

if (app.want_version()) {
options.command = command_t::version;
return options;
}

if (options.append && app.count("--create")) {
throw std::runtime_error{"--append and --create options can not be "
"used at the same time!"};
Expand Down

0 comments on commit 770083d

Please sign in to comment.