Skip to content

Commit

Permalink
repmgr: fix command line parsing with hostname as an additional argument
Browse files Browse the repository at this point in the history
Check explicitly whether -h/--hostname provided, otherwise PGHOST,
if set, will be misinterpreted.
  • Loading branch information
ibarwick committed Mar 14, 2017
1 parent ea6fff7 commit b154a5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion repmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b154a5c

Please sign in to comment.