Always set the host variable

The `host` variable is required, so always set it to avoid error
messages when validating the host configuration.
This commit is contained in:
Richard Hansen 2024-06-29 02:26:16 -04:00
parent be3c2060eb
commit 04bdd68415

View file

@ -1950,7 +1950,7 @@ sub init_config {
## merge options into host definitions or globals
if (@hosts) {
for my $h (@hosts) {
$config{$h} = {%{$config{$h} // {}}, %options};
$config{$h} = {%{$config{$h} // {}}, %options, 'host' => $h};
}
$opt{'host'} = join(',', @hosts);
} else {
@ -2031,7 +2031,7 @@ sub init_config {
}
my $svars = $protocols{$proto}{'variables'};
my $conf = {'protocol' => $proto};
my $conf = {'host' => $h, 'protocol' => $proto};
for my $k (keys %$svars) {
# Make sure any _env suffixed variables look at their original entry