Show formatted error message with address and netmask

This commit is contained in:
Chris Roberts 2018-11-02 15:03:22 -07:00
parent d9d081199c
commit 5add5c24fe
2 changed files with 8 additions and 4 deletions

View File

@ -276,7 +276,8 @@ module VagrantPlugins
netaddr = IPAddr.new("#{options[:ip]}/#{options[:netmask]}")
rescue IPAddr::Error => e
raise Vagrant::Errors::NetworkAddressInvalid,
options: options, error: e.message
address: options[:ip], mask: options[:netmask],
error: e.message
end
if ip.ipv4?

View File

@ -972,10 +972,13 @@ en:
network_type_not_supported: |-
The %{type} network type is not supported for this box or guest.
network_address_invalid: |-
Network settings specified in your Vagrantfile are invalid:
Network settings specified in your Vagrantfile define an invalid
IP address. Please review the error message below and update your
Vagrantfile network settings:
Network settings: %{options}
Error: %{error}
Address: %{address}
Netmask: %{mask}
Error: %{error}
network_manager_not_installed: |-
Vagrant was instructed to configure the %{device} network device to
be managed by NetworkManager. However, the configured guest VM does