core: Get the plugin to work on Vagrant 1.4 nicely

This commit is contained in:
Fabio Rehm 2014-03-12 22:47:05 -03:00
parent 23e82594e1
commit fb58d6c878
2 changed files with 11 additions and 6 deletions

View file

@ -1,8 +1,12 @@
module Vagrant
module UI
class Interface
alias :output :info
alias :detail :info
def output(*args)
info(*args)
end
def detail(*args)
info(*args)
end
end
end
end

View file

@ -7,7 +7,7 @@ module Vagrant
end
def prepare(machine, folders, _opts)
machine.ui.output(I18n.t("vagrant.actions.vm.share_folders.mounting"))
machine.ui.output(I18n.t("vagrant.actions.lxc.share_folders.preparing"))
folders.each do |id, data|
host_path = Pathname.new(File.expand_path(data[:hostpath], machine.env.root_path))
@ -15,7 +15,7 @@ module Vagrant
if !host_path.directory? && data[:create]
# Host path doesn't exist, so let's create it.
@logger.debug("Host path doesn't exist, creating: #{host_path}")
@logger.info("Host path doesn't exist, creating: #{host_path}")
begin
host_path.mkpath
@ -28,8 +28,9 @@ module Vagrant
machine.provider.driver.share_folder(host_path, guest_path)
# Guest path specified, so mount the folder to specified point
machine.ui.detail(I18n.t("vagrant.actions.vm.share_folders.mounting_entry",
guestpath: data[:guestpath],
hostpath: data[:hostpath]))
guestpath: data[:guestpath],
hostpath: data[:hostpath],
guest_path: data[:guestpath]))
end
end
end