diff options
author | Phil Dibowitz <phil@ipom.com> | 2016-05-12 14:55:56 -0700 |
---|---|---|
committer | Phil Dibowitz <phil@ipom.com> | 2016-05-12 14:55:56 -0700 |
commit | db9e11a6d64db304b04850bf6ff0ce3d782f5482 (patch) | |
tree | 311c1dbd64ccea9efcab021ef33a7d95481322fe | |
parent | 3be2aedd3e88b353737876d60aa956e915a49888 (diff) | |
parent | e22701e9bd6f62b07af04a6ddca0cd1e3b6617b8 (diff) | |
download | chef-db9e11a6d64db304b04850bf6ff0ce3d782f5482.tar.gz |
Merge pull request #4921 from achand/profile_provider_fix
fix os x profile provider for nil
-rw-r--r-- | lib/chef/provider/osx_profile.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/chef/provider/osx_profile.rb b/lib/chef/provider/osx_profile.rb index 6ac67e0560..f2e71a6621 100644 --- a/lib/chef/provider/osx_profile.rb +++ b/lib/chef/provider/osx_profile.rb @@ -54,9 +54,8 @@ class Chef @new_resource.profile_name end - if all_profiles.empty? - current_profile = nil - else + current_profile = nil + if all_profiles && !all_profiles.empty? current_profile = all_profiles["_computerlevel"].find do |item| item["ProfileIdentifier"] == @new_profile_identifier end |