summaryrefslogtreecommitdiff
path: root/spec/support/platform_helpers.rb
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2020-08-14 10:15:40 -0700
committerGitHub <noreply@github.com>2020-08-14 10:15:40 -0700
commitc0c8c32e41a4496d3b78acc942f26f667045b3f8 (patch)
treee1ba9028cb89f0fc83fcbecb5ed778ac4ad6f630 /spec/support/platform_helpers.rb
parentb9df6856a1eb4688f013ba0449a362f951ab40e5 (diff)
parent4848c89b7cc5e4a4d4fac7c8bff962f7df69f719 (diff)
downloadchef-c0c8c32e41a4496d3b78acc942f26f667045b3f8.tar.gz
Merge pull request #10284 from chef/exist
Fix File.exist throughout the codebase
Diffstat (limited to 'spec/support/platform_helpers.rb')
-rw-r--r--spec/support/platform_helpers.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/support/platform_helpers.rb b/spec/support/platform_helpers.rb
index 05839d40ea..8d21c5cbd2 100644
--- a/spec/support/platform_helpers.rb
+++ b/spec/support/platform_helpers.rb
@@ -105,7 +105,7 @@ def mac_osx_1014?
end
def mac_osx?
- if File.exists? "/usr/bin/sw_vers"
+ if File.exist? "/usr/bin/sw_vers"
result = ShellHelpers.shell_out("/usr/bin/sw_vers")
result.stdout.each_line do |line|
if /^ProductName:\sMac OS X.*$/.match?(line)
@@ -216,8 +216,8 @@ def selinux_enabled?
end
def suse?
- ::File.exists?("/etc/SuSE-release") ||
- ( ::File.exists?("/etc/os-release") && /sles|suse/.match?(File.read("/etc/os-release")) )
+ ::File.exist?("/etc/SuSE-release") ||
+ ( ::File.exist?("/etc/os-release") && /sles|suse/.match?(File.read("/etc/os-release")) )
end
def root?