lib/berkshelf/vagrant.rb in berkshelf-0.5.0.rc1 vs lib/berkshelf/vagrant.rb in berkshelf-0.5.0.rc2
- old
+ new
@@ -16,9 +16,13 @@
autoload :Middleware, 'berkshelf/vagrant/middleware'
class << self
# @param [Vagrant::Action::Environment] env
def shelf_for(env)
+ unless env[:global_config].vm.host_name
+ return nil
+ end
+
File.join(Berkshelf.berkshelf_path, "vagrant", env[:global_config].vm.host_name)
end
# @param [Symbol] shortcut
# @param [Vagrant::Config::Top] config