core: Get the plugin to work on Vagrant 1.4 nicely
This commit is contained in:
parent
23e82594e1
commit
fb58d6c878
2 changed files with 11 additions and 6 deletions
|
@ -1,8 +1,12 @@
|
||||||
module Vagrant
|
module Vagrant
|
||||||
module UI
|
module UI
|
||||||
class Interface
|
class Interface
|
||||||
alias :output :info
|
def output(*args)
|
||||||
alias :detail :info
|
info(*args)
|
||||||
|
end
|
||||||
|
def detail(*args)
|
||||||
|
info(*args)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -7,7 +7,7 @@ module Vagrant
|
||||||
end
|
end
|
||||||
|
|
||||||
def prepare(machine, folders, _opts)
|
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|
|
folders.each do |id, data|
|
||||||
host_path = Pathname.new(File.expand_path(data[:hostpath], machine.env.root_path))
|
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]
|
if !host_path.directory? && data[:create]
|
||||||
# Host path doesn't exist, so let's create it.
|
# 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
|
begin
|
||||||
host_path.mkpath
|
host_path.mkpath
|
||||||
|
@ -28,8 +28,9 @@ module Vagrant
|
||||||
machine.provider.driver.share_folder(host_path, guest_path)
|
machine.provider.driver.share_folder(host_path, guest_path)
|
||||||
# Guest path specified, so mount the folder to specified point
|
# Guest path specified, so mount the folder to specified point
|
||||||
machine.ui.detail(I18n.t("vagrant.actions.vm.share_folders.mounting_entry",
|
machine.ui.detail(I18n.t("vagrant.actions.vm.share_folders.mounting_entry",
|
||||||
guestpath: data[:guestpath],
|
guestpath: data[:guestpath],
|
||||||
hostpath: data[:hostpath]))
|
hostpath: data[:hostpath],
|
||||||
|
guest_path: data[:guestpath]))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue