Skip to content

Commit 0cc1f5f

Browse files
committed
Fixed conditions in network_ip_ends_in_one
Solve error: undefined method `end_with?' for nil:NilClass (NoMethodError)
1 parent 9df95a2 commit 0cc1f5f

File tree

1 file changed

+2
-2
lines changed
  • plugins/kernel_v2/config

1 file changed

+2
-2
lines changed

plugins/kernel_v2/config/vm.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -922,8 +922,8 @@ def validate(machine, ignore_provider=nil)
922922
errors << I18n.t("vagrant.config.vm.network_ip_required")
923923
end
924924
end
925-
926-
if options[:ip] && options[:ip].end_with?(".1") || options[:ip].end_with?(":1") && (options[:type] || "").to_sym != :dhcp
925+
926+
if options[:ip] && (options[:ip].end_with?(".1") || options[:ip].end_with?(":1")) && (options[:type] || "").to_sym != :dhcp
927927
machine.ui.warn(I18n.t(
928928
"vagrant.config.vm.network_ip_ends_in_one"))
929929
end

0 commit comments

Comments
 (0)