Fixed conditions in network_ip_ends_in_one

Solve error: undefined method `end_with?' for nil:NilClass (NoMethodError)
This commit is contained in:
Mattia Rombi 2024-08-27 00:38:44 +02:00
parent 9df95a2002
commit a030ec068f

View file

@ -923,7 +923,7 @@ module VagrantPlugins
end
end
if options[:ip] && options[:ip].end_with?(".1") || options[:ip].end_with?(":1") && (options[:type] || "").to_sym != :dhcp
if options[:ip] && (options[:ip].end_with?(".1") || options[:ip].end_with?(":1")) && (options[:type] || "").to_sym != :dhcp
machine.ui.warn(I18n.t(
"vagrant.config.vm.network_ip_ends_in_one"))
end