diff options
author | John Keiser <jkeiser@opscode.com> | 2014-04-23 14:28:08 -0700 |
---|---|---|
committer | John Keiser <jkeiser@opscode.com> | 2014-04-23 14:28:08 -0700 |
commit | 0c6ebdc02cf3892e5ad395879cf80e9f18290af9 (patch) | |
tree | 46d3f63d58a5693481c1aa5b3e3a56c9ee4e9db5 /lib/chef/chef_fs | |
parent | 81818db3e9859602b3bd2668050531db111635e0 (diff) | |
download | chef-0c6ebdc02cf3892e5ad395879cf80e9f18290af9.tar.gz |
Make root_dir required for CookbookVersion to generate manifest
Diffstat (limited to 'lib/chef/chef_fs')
-rw-r--r-- | lib/chef/chef_fs/chef_fs_data_store.rb | 1 | ||||
-rw-r--r-- | lib/chef/chef_fs/file_system/chef_repository_file_system_cookbook_dir.rb | 9 |
2 files changed, 8 insertions, 2 deletions
diff --git a/lib/chef/chef_fs/chef_fs_data_store.rb b/lib/chef/chef_fs/chef_fs_data_store.rb index 28f0af4695..b84fc1945d 100644 --- a/lib/chef/chef_fs/chef_fs_data_store.rb +++ b/lib/chef/chef_fs/chef_fs_data_store.rb @@ -24,6 +24,7 @@ require 'chef/chef_fs/file_system' require 'chef/chef_fs/file_system/not_found_error' require 'chef/chef_fs/file_system/memory_root' require 'fileutils' + class Chef module ChefFS class ChefFSDataStore diff --git a/lib/chef/chef_fs/file_system/chef_repository_file_system_cookbook_dir.rb b/lib/chef/chef_fs/file_system/chef_repository_file_system_cookbook_dir.rb index 629c1d9acb..b151db6973 100644 --- a/lib/chef/chef_fs/file_system/chef_repository_file_system_cookbook_dir.rb +++ b/lib/chef/chef_fs/file_system/chef_repository_file_system_cookbook_dir.rb @@ -44,12 +44,17 @@ class Chef end loader.load_cookbooks - return loader.cookbook_version + cb = loader.cookbook_version + if !cb + Chef::Log.error("Cookbook #{file_path} empty.") + raise "Cookbook #{file_path} empty." + end + cb rescue => e Chef::Log.error("Could not read #{path_for_printing} into a Chef object: #{e}") Chef::Log.error(e.backtrace.join("\n")) + raise end - nil end def children |