mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-25 16:16:29 +00:00
repmgr: fix command line parsing with hostname as an additional argument
Check explicitly whether -h/--hostname provided, otherwise PGHOST, if set, will be misinterpreted.
This commit is contained in:
2
repmgr.c
2
repmgr.c
@@ -758,7 +758,7 @@ main(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
if (optind < argc)
|
if (optind < argc)
|
||||||
{
|
{
|
||||||
if (runtime_options.host[0])
|
if (runtime_options.host_param_provided == true)
|
||||||
{
|
{
|
||||||
PQExpBufferData additional_host_arg;
|
PQExpBufferData additional_host_arg;
|
||||||
initPQExpBuffer(&additional_host_arg);
|
initPQExpBuffer(&additional_host_arg);
|
||||||
|
|||||||
Reference in New Issue
Block a user