lib/berkshelf/vagrant/action/load_shelf.rb in vagrant-berkshelf-1.3.7 vs lib/berkshelf/vagrant/action/load_shelf.rb in vagrant-berkshelf-1.4.0.dev1
- old
+ new
@@ -13,12 +13,12 @@
unless berkshelf_enabled?(env)
return @app.call(env)
end
# Make sure that Berkshelf itself uses distinct directories for each vagrant run.
- ENV['BERKSHELF_PATH'] = File.join(Berkshelf.berkshelf_path, env[:machine].name.to_s) unless ENV['BERKSHELF_PATH']
+ ENV['BERKSHELF_PATH'] ||= File.join(Berkshelf.berkshelf_path, env[:machine].name.to_s)
- shelf = load_shelf env
+ shelf = load_shelf(env)
if shelf.nil?
shelf = cache_shelf(Berkshelf::Vagrant.mkshelf(env[:machine].name), env)
end