core: Use HandleBox in case Vagrant 1.5 is in use

This commit is contained in:
Fabio Rehm 2014-03-11 20:56:11 -03:00
parent 891403f10d
commit a0acc571b2
2 changed files with 8 additions and 1 deletions

View file

@ -4,6 +4,10 @@ module Vagrant
def vagrant_1_3_or_later?
Gem::Version.new(Vagrant::VERSION) >= Gem::Version.new('1.3.0')
end
def vagrant_1_5_or_later?
Gem::Version.new(Vagrant::VERSION) >= Gem::Version.new('1.5.0')
end
end
end
end

View file

@ -23,6 +23,9 @@ require 'vagrant-lxc/action/warn_networks'
unless Vagrant::Backports.vagrant_1_3_or_later?
require 'vagrant-backports/action/wait_for_communicator'
end
unless Vagrant::Backports.vagrant_1_5_or_later?
require 'vagrant-backports/action/handle_box'
end
module Vagrant
module LXC
@ -108,7 +111,7 @@ module Vagrant
b.use Builtin::Call, Created do |env, b2|
# If the VM is NOT created yet, then do the setup steps
if !env[:result]
b2.use Builtin::HandleBoxUrl
b2.use Builtin::HandleBox
b2.use HandleBoxMetadata
b2.use Create
end