summaryrefslogtreecommitdiff
path: root/lib/chef/util
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-08-11 13:30:10 -0700
committerTim Smith <tsmith84@gmail.com>2020-08-12 14:02:34 -0700
commit4848c89b7cc5e4a4d4fac7c8bff962f7df69f719 (patch)
treecf1bc6d0b30f226573da88158049f1334b6ce1bd /lib/chef/util
parent798cac61accc035b51aaac25160bf1d5e9715252 (diff)
downloadchef-4848c89b7cc5e4a4d4fac7c8bff962f7df69f719.tar.gz
File.exists? -> File.exist?exist
Update some of these methods Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib/chef/util')
-rw-r--r--lib/chef/util/diff.rb2
-rw-r--r--lib/chef/util/powershell/cmdlet.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/util/diff.rb b/lib/chef/util/diff.rb
index 806da5922e..3f8a925c4d 100644
--- a/lib/chef/util/diff.rb
+++ b/lib/chef/util/diff.rb
@@ -63,7 +63,7 @@ class Chef
def use_tempfile_if_missing(file)
tempfile = nil
- unless File.exists?(file)
+ unless File.exist?(file)
Chef::Log.trace("File #{file} does not exist to diff against, using empty tempfile")
tempfile = Tempfile.new("chef-diff")
file = tempfile.path
diff --git a/lib/chef/util/powershell/cmdlet.rb b/lib/chef/util/powershell/cmdlet.rb
index e9e3be1738..344e20f466 100644
--- a/lib/chef/util/powershell/cmdlet.rb
+++ b/lib/chef/util/powershell/cmdlet.rb
@@ -164,7 +164,7 @@ class Chef
end
def self.destroy(name)
- proc { File.delete(name) if File.exists? name }
+ proc { File.delete(name) if File.exist? name }
end
end
end