Fix WarnNetworks action [GH-154]

This commit is contained in:
Fabio Rehm 2013-11-06 21:21:16 -02:00
parent 0e57cfc2b0
commit b86b83eba1
2 changed files with 4 additions and 4 deletions

View file

@ -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

View file

@ -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: