Merge pull request #11175 from briancain/fixup/show-machine-name-in-hostname-validation

Fixes #11173: Show guest name in hostname error message
This commit is contained in:
Brian Cain 2019-11-07 13:21:42 -08:00 committed by GitHub
commit 509812b8e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -609,7 +609,7 @@ module VagrantPlugins
errors << I18n.t("vagrant.config.vm.clone_and_box")
end
errors << I18n.t("vagrant.config.vm.hostname_invalid_characters") if \
errors << I18n.t("vagrant.config.vm.hostname_invalid_characters", name: machine.name) if \
@hostname && @hostname !~ /^[a-z0-9][-.a-z0-9]*$/i
if @box_version

View File

@ -1888,7 +1888,7 @@ en:
box_missing: "A box must be specified."
clone_and_box: "Only one of clone or box can be specified."
hostname_invalid_characters: |-
The hostname set for the VM should only contain letters, numbers,
The hostname set for the VM '%{name}' should only contain letters, numbers,
hyphens or dots. It cannot start with a hyphen or dot.
ignore_provider_config: |-
Ignoring provider config for validation...