summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2018-03-22 08:59:45 -0700
committerTim Smith <tsmith@chef.io>2018-03-22 08:59:45 -0700
commitd29843b5bcdd7bc8b5eba741549a3e8b2c00607d (patch)
treeff4eb0d5958fd950d3765294bc79d24785291f2e /lib
parent4d45dedc44b54001caf2e0e5eeada98dda449647 (diff)
downloadchef-d29843b5bcdd7bc8b5eba741549a3e8b2c00607d.tar.gz
Fix the condition on the raise with unknown keys
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib')
-rw-r--r--lib/chef/resource/sysctl.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/resource/sysctl.rb b/lib/chef/resource/sysctl.rb
index 29222b04d3..ed9013d7cc 100644
--- a/lib/chef/resource/sysctl.rb
+++ b/lib/chef/resource/sysctl.rb
@@ -65,7 +65,7 @@ class Chef
def get_sysctl_value(key)
o = shell_out("sysctl -n -e #{key}")
- raise "Unknown sysctl key #{key}!" if o.error!
+ raise "Unknown sysctl key #{key}!" if o.error?
o.stdout.to_s.tr("\t", " ").strip
end