summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2020-08-18 12:22:00 -0700
committerGitHub <noreply@github.com>2020-08-18 12:22:00 -0700
commitfc953cefe6119d659973b9c635543bc06f3f1285 (patch)
treece12ca66dc45faafd8def438ba209b2ba38d9585
parentb1bb6b851307567880d57ac94e6a0749f7e67dff (diff)
parentcf67291bc9e2850a8b7ab2753453720acc5df588 (diff)
downloadchef-fc953cefe6119d659973b9c635543bc06f3f1285.tar.gz
Merge pull request #10324 from chef/lcg/fix-removing-nonexistent-profile
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--lib/chef/resource/osx_profile.rb2
-rw-r--r--spec/unit/resource/osx_profile_spec.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/resource/osx_profile.rb b/lib/chef/resource/osx_profile.rb
index 437290742d..23a4e86505 100644
--- a/lib/chef/resource/osx_profile.rb
+++ b/lib/chef/resource/osx_profile.rb
@@ -253,7 +253,7 @@ class Chef
def query_installed_profiles
Tempfile.open("allprofiles.plist") do |tempfile|
- shell_out!( "/usr/bin/profiles", "-P", "-o", tempfile.path )
+ shell_out( "/usr/bin/profiles", "-P", "-o", tempfile.path )
::Plist.parse_xml(tempfile)
end
end
diff --git a/spec/unit/resource/osx_profile_spec.rb b/spec/unit/resource/osx_profile_spec.rb
index a9acadced8..7e2173f823 100644
--- a/spec/unit/resource/osx_profile_spec.rb
+++ b/spec/unit/resource/osx_profile_spec.rb
@@ -155,7 +155,7 @@ describe Chef::Resource::OsxProfile do
resource.profile_name profile_name
allow(provider).to receive(:get_installed_profiles).and_call_original
allow(provider).to receive(:read_plist).and_return(all_profiles)
- expect(provider).to receive(:shell_out_compacted!).with("/usr/bin/profiles", "-P", "-o", kind_of(String))
+ expect(provider).to receive(:shell_out_compacted).with("/usr/bin/profiles", "-P", "-o", kind_of(String))
provider.load_current_resource
end