Skip to content

Commit

Permalink
Fixed conditions in network_ip_ends_in_one
Browse files Browse the repository at this point in the history
Solve error: undefined method `end_with?' for nil:NilClass (NoMethodError)
  • Loading branch information
MatrixDJ96 committed Aug 26, 2024
1 parent 9df95a2 commit a030ec0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/kernel_v2/config/vm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -923,7 +923,7 @@ def validate(machine, ignore_provider=nil)
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
Expand Down

0 comments on commit a030ec0

Please sign in to comment.