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:
commit
509812b8e6
|
@ -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
|
||||
|
|
|
@ -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...
|
||||
|
|
Loading…
Reference in New Issue