Get rid of broken env.ui calls in actions
This commit is contained in:
parent
697fb7eaaf
commit
448e9429ac
|
@ -9,9 +9,9 @@ module Vagrant
|
|||
end
|
||||
|
||||
def call(env)
|
||||
if env["vm"].created? && env["vm"].vm.saved?
|
||||
env.ui.info I18n.t("vagrant.actions.vm.discard_state.discarding")
|
||||
env["vm"].vm.discard_state
|
||||
if env[:vm].created? && env[:vm].vm.saved?
|
||||
env[:ui].info I18n.t("vagrant.actions.vm.discard_state.discarding")
|
||||
env[:vm].vm.discard_state
|
||||
end
|
||||
|
||||
@app.call(env)
|
||||
|
|
|
@ -65,9 +65,9 @@ module Vagrant
|
|||
# Enables and assigns the host only network to the proper
|
||||
# adapter on the VM, and saves the adapter.
|
||||
def assign_network
|
||||
@env.ui.info I18n.t("vagrant.actions.vm.network.preparing")
|
||||
@env[:ui].info I18n.t("vagrant.actions.vm.network.preparing")
|
||||
|
||||
@env.env.config.vm.network_options.compact.each do |network_options|
|
||||
@env.[:vm].config.vm.network_options.compact.each do |network_options|
|
||||
adapter = @env["vm"].vm.network_adapters[network_options[:adapter]]
|
||||
adapter.enabled = true
|
||||
adapter.attachment_type = :host_only
|
||||
|
@ -98,7 +98,7 @@ module Vagrant
|
|||
raise Errors::NetworkNotFound, :name => net_options[:name] if net_options[:name]
|
||||
|
||||
# One doesn't exist, create it.
|
||||
@env.ui.info I18n.t("vagrant.actions.vm.network.creating")
|
||||
@env[:ui].info I18n.t("vagrant.actions.vm.network.creating")
|
||||
|
||||
ni = interfaces.create
|
||||
ni.enable_static(network_ip(net_options[:ip], net_options[:netmask]),
|
||||
|
|
|
@ -111,7 +111,7 @@ module Vagrant
|
|||
|
||||
# Uses the system class to mount the NFS folders.
|
||||
def mount_folders
|
||||
@env.ui.info I18n.t("vagrant.actions.vm.nfs.mounting")
|
||||
@env[:ui].info I18n.t("vagrant.actions.vm.nfs.mounting")
|
||||
|
||||
# Only mount the folders which have a guest path specified
|
||||
am_folders = folders.select { |name, folder| folder[:guestpath] }
|
||||
|
|
|
@ -18,7 +18,7 @@ module Vagrant
|
|||
|
||||
# Take prepared provisioners and run the provisioning
|
||||
provisioners.each do |instance|
|
||||
@env.ui.info I18n.t("vagrant.actions.vm.provision.beginning", :provisioner => instance.class)
|
||||
@env[:ui].info I18n.t("vagrant.actions.vm.provision.beginning", :provisioner => instance.class)
|
||||
instance.provision!
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue