lib/berkshelf/vagrant/action/install.rb in berkshelf-0.5.1 vs lib/berkshelf/vagrant/action/install.rb in berkshelf-0.6.0.beta1

- old
+ new

@@ -9,18 +9,18 @@ attr_reader :berksfile def initialize(app, env) @app = app @shelf = Berkshelf::Vagrant.shelf_for(env) - @config = env[:vm].config.berkshelf + @config = env[:global_config].berkshelf Berkshelf.config_path = @config.config_path Berkshelf.load_config @berksfile = Berksfile.from_file(@config.berksfile_path) end def call(env) - if Berkshelf::Vagrant.chef_solo?(env[:vm].config) + if Berkshelf::Vagrant.chef_solo?(env[:global_config]) configure_cookbooks_path(env) install(env) end @app.call(env) @@ -35,10 +35,10 @@ }.merge(self.config.to_hash).symbolize_keys! berksfile.install(opts) end def configure_cookbooks_path(env) - Berkshelf::Vagrant.provisioners(:chef_solo, env[:vm].config).each do |provisioner| + Berkshelf::Vagrant.provisioners(:chef_solo, env[:global_config]).each do |provisioner| provisioner.config.cookbooks_path.unshift(self.shelf) end end end end