summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2017-09-27 16:53:27 -0700
committerTim Smith <tsmith@chef.io>2017-09-28 11:04:54 -0700
commit7432c31db401ed7189419ac74be7839f10941527 (patch)
tree0bfdad286bfd89150aaa6a599891d693b0490a96
parent4df19b0ac8a403c127986e4f6f5e739b8930eb7c (diff)
downloadchef-7432c31db401ed7189419ac74be7839f10941527.tar.gz
Remove run_command usage in shell_out
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--lib/chef/provider/zypper_repository.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/provider/zypper_repository.rb b/lib/chef/provider/zypper_repository.rb
index a1a31d5bea..aec4dff828 100644
--- a/lib/chef/provider/zypper_repository.rb
+++ b/lib/chef/provider/zypper_repository.rb
@@ -112,7 +112,7 @@ class Chef
#
# @return [boolean] is the key already known by rpm
def key_installed?(key_path)
- so = shell_out("rpm -qa gpg-pubkey*").run_command
+ so = shell_out("rpm -qa gpg-pubkey*")
# expected output & match: http://rubular.com/r/RdF7EcXEtb
status = /gpg-pubkey-#{key_fingerprint(key_path)}/.match(so.stdout)
Chef::Log.debug("GPG key at #{key_path} is known by rpm? #{status ? "true" : "false"}")
@@ -124,7 +124,7 @@ class Chef
#
# @return [String] the fingerprint of the key
def key_fingerprint(key_path)
- so = shell_out("gpg --with-fingerprint #{key_path}").run_command
+ so = shell_out("gpg --with-fingerprint #{key_path}")
# expected output and match: http://rubular.com/r/BpfMjxySQM
fingerprint = /pub\s*\S*\/(\S*)/.match(so.stdout)[1].downcase
Chef::Log.debug("GPG fingerprint of key at #{key_path} is #{fingerprint}")