summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2017-01-23 12:17:58 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2017-01-24 09:51:19 -0800
commit737accb8e44c7226f562a4c535a71bee2a27a824 (patch)
tree9f1ee53d13addf59ebba33d02296a59dd24d31ab
parent7086527ca56bafa06e4627dc18c5c1b3735dbfb5 (diff)
downloadchef-lcg/favor-metadta-rb.tar.gz
favor metadata.json over metadata.rblcg/favor-metadta-rb
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-rw-r--r--lib/chef/cookbook/cookbook_version_loader.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/chef/cookbook/cookbook_version_loader.rb b/lib/chef/cookbook/cookbook_version_loader.rb
index d253c956b2..b2305d3870 100644
--- a/lib/chef/cookbook/cookbook_version_loader.rb
+++ b/lib/chef/cookbook/cookbook_version_loader.rb
@@ -108,10 +108,10 @@ class Chef
@uploaded_cookbook_version_file = File.join(cookbook_path, UPLOADED_COOKBOOK_VERSION_FILE)
end
- if File.exists?(File.join(cookbook_path, "metadata.rb"))
- @metadata_filenames << File.join(cookbook_path, "metadata.rb")
- elsif File.exists?(File.join(cookbook_path, "metadata.json"))
+ if File.exists?(File.join(cookbook_path, "metadata.json"))
@metadata_filenames << File.join(cookbook_path, "metadata.json")
+ elsif File.exists?(File.join(cookbook_path, "metadata.rb"))
+ @metadata_filenames << File.join(cookbook_path, "metadata.rb")
elsif @uploaded_cookbook_version_file
@metadata_filenames << @uploaded_cookbook_version_file
end