From 05bfdfab2cea1a46fdafa2d8c7e7a3fa1fae0697 Mon Sep 17 00:00:00 2001 From: Ian Barwick Date: Tue, 14 Mar 2017 22:52:15 +0900 Subject: [PATCH] repmgr: fix command line parsing with hostname as an additional argument Check explicitly whether -h/--hostname provided, otherwise PGHOST, if set, will be misinterpreted. --- repmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repmgr.c b/repmgr.c index 6fdf3fc3..30e60b37 100644 --- a/repmgr.c +++ b/repmgr.c @@ -758,7 +758,7 @@ main(int argc, char **argv) { if (optind < argc) { - if (runtime_options.host[0]) + if (runtime_options.host_param_provided == true) { PQExpBufferData additional_host_arg; initPQExpBuffer(&additional_host_arg);