summaryrefslogtreecommitdiff
path: root/lib/chef/cookbook/cookbook_version_loader.rb
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-11-21 21:34:19 -0800
committerTim Smith <tsmith84@gmail.com>2020-11-27 15:04:01 -0800
commit6b2f219f13b7d28ee9277f98bf11e69903fefc92 (patch)
treece287b5e1e9674c6a2db05ecd712c2493cb6a450 /lib/chef/cookbook/cookbook_version_loader.rb
parent8bd0da60b8b5867566b4a2fbf339c7c97eb8bd6a (diff)
downloadchef-exists.tar.gz
Convert the last our of File.exists? to File.exist?exists
Standardize on the new method Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib/chef/cookbook/cookbook_version_loader.rb')
-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 faed509321..00cf22e6da 100644
--- a/lib/chef/cookbook/cookbook_version_loader.rb
+++ b/lib/chef/cookbook/cookbook_version_loader.rb
@@ -160,13 +160,13 @@ class Chef
def metadata_filenames
return @metadata_filenames unless @metadata_filenames.empty?
- if File.exists?(File.join(cookbook_path, UPLOADED_COOKBOOK_VERSION_FILE))
+ if File.exist?(File.join(cookbook_path, UPLOADED_COOKBOOK_VERSION_FILE))
@uploaded_cookbook_version_file = File.join(cookbook_path, UPLOADED_COOKBOOK_VERSION_FILE)
end
- if File.exists?(File.join(cookbook_path, "metadata.json"))
+ if File.exist?(File.join(cookbook_path, "metadata.json"))
@metadata_filenames << File.join(cookbook_path, "metadata.json")
- elsif File.exists?(File.join(cookbook_path, "metadata.rb"))
+ elsif File.exist?(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