box_url downloading happens before config validation [GH-1061]
This commit is contained in:
parent
3840e07adb
commit
e941c549f2
|
@ -15,7 +15,10 @@ IMPROVEMENTS:
|
|||
|
||||
BUG FIXES:
|
||||
|
||||
- core/nfs: Exporting sub-directories of other exported folders now
|
||||
- Boxes downloaded as part of `vagrant up` are now done so _prior_ to
|
||||
config validation. This allows Vagrantfiles to references files that
|
||||
may be in the box itself. [GH-1061]
|
||||
- NFS synced folders exporting sub-directories of other exported folders now
|
||||
works properly. [GH-785]
|
||||
|
||||
## 1.2.3 (July 9, 2013)
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
require "thread"
|
||||
|
||||
require "log4r"
|
||||
|
||||
module Vagrant
|
||||
module Action
|
||||
module Builtin
|
||||
|
@ -13,9 +15,16 @@ module Vagrant
|
|||
|
||||
def initialize(app, env)
|
||||
@app = app
|
||||
@logger = Log4r::Logger.new("vagrant::action::builtin::handle_box_url")
|
||||
end
|
||||
|
||||
def call(env)
|
||||
if !env[:machine].config.vm.box || !env[:machine].config.vm.box_url
|
||||
@logger.info("Skipping HandleBoxUrl because box or box_url not set.")
|
||||
@app.call(env)
|
||||
return
|
||||
end
|
||||
|
||||
if !env[:machine].box
|
||||
# Get a "big lock" to make sure that our more fine grained
|
||||
# lock access is thread safe.
|
||||
|
|
|
@ -293,12 +293,21 @@ module VagrantPlugins
|
|||
def self.action_up
|
||||
Vagrant::Action::Builder.new.tap do |b|
|
||||
b.use CheckVirtualbox
|
||||
|
||||
# Handle box_url downloading early so that if the Vagrantfile
|
||||
# references any files in the box or something it all just
|
||||
# works fine.
|
||||
b.use Call, Created do |env, b2|
|
||||
if !env[:result]
|
||||
b2.use HandleBoxUrl
|
||||
end
|
||||
end
|
||||
|
||||
b.use ConfigValidate
|
||||
b.use Call, Created do |env, b2|
|
||||
# If the VM is NOT created yet, then do the setup steps
|
||||
if !env[:result]
|
||||
b2.use CheckAccessible
|
||||
b2.use HandleBoxUrl
|
||||
b2.use Import
|
||||
b2.use MatchMACAddress
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue