From e73c07ebf2b26750d83b24ff5ae627125f0db8f4 Mon Sep 17 00:00:00 2001 From: Mark John Merin Date: Fri, 4 Mar 2022 13:24:58 -0800 Subject: [PATCH] remove the fallback to using attributes as we plan on removing them in the future --- resources/certificate.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/resources/certificate.rb b/resources/certificate.rb index 8735e2d..924080f 100644 --- a/resources/certificate.rb +++ b/resources/certificate.rb @@ -6,15 +6,14 @@ default_action :install property :certfile, String property :cert_password, String, sensitive: true property :keychain, String, required: true -property :kc_passwd, String, sensitive: true +property :kc_passwd, String, required: true, sensitive: true property :apps, Array action :install do cert = SecurityCommand.new(new_resource.certfile, new_resource.keychain) execute 'unlock keychain' do - password = new_resource.property_is_set?(:kc_passwd) ? new_resource.kc_passwd : node['macos']['admin_password'] - command Array(cert.unlock_keychain(password)) + command Array(cert.unlock_keychain(new_resource.kc_passwd)) end cert_shasum = shell_out("shasum #{new_resource.certfile}").stdout.upcase.gsub(/\s.+/, '')