Fix WarnNetworks action [GH-154]
This commit is contained in:
parent
0e57cfc2b0
commit
b86b83eba1
2 changed files with 4 additions and 4 deletions
|
@ -7,15 +7,15 @@ module Vagrant
|
|||
end
|
||||
|
||||
def call(env)
|
||||
if public_or_private_network_configured?
|
||||
if public_or_private_network_configured?(env[:machine].config)
|
||||
env[:ui].warn(I18n.t("vagrant_lxc.messages.warn_networks"))
|
||||
end
|
||||
|
||||
@app.call(env)
|
||||
end
|
||||
|
||||
def public_or_private_network_configured?
|
||||
config.vm.networks.find do |type|
|
||||
def public_or_private_network_configured?(config)
|
||||
config.vm.networks.find do |type, _|
|
||||
[:private_network, :public_network].include?(type.to_sym)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -19,7 +19,7 @@ en:
|
|||
Container started and ready for use!
|
||||
warn_networks: |-
|
||||
Warning! The LXC provider doesn't support any of the Vagrant public / private
|
||||
network configurations (`config.vm.network :private_network, ip: "some-ip"`).
|
||||
network configurations (ex: `config.vm.network :private_network, ip: "some-ip"`).
|
||||
They will be silently ignored.
|
||||
|
||||
vagrant:
|
||||
|
|
Loading…
Reference in a new issue