diff options
author | Pranay Singh <i5singh.pranay@gmail.com> | 2022-04-28 14:14:04 +0530 |
---|---|---|
committer | Pranay Singh <i5singh.pranay@gmail.com> | 2022-04-28 14:14:04 +0530 |
commit | ef27edec592e87b637220b05f582f3e786218dc3 (patch) | |
tree | 0769e1042c9eec3ac404660eae2ca3a26ba0383b | |
parent | 3fbcea52fd161e18216db0bf42c8e91ace71ade9 (diff) | |
download | chef-ef27edec592e87b637220b05f582f3e786218dc3.tar.gz |
adding exception to bypass nil class error in compliance phase
-rw-r--r-- | lib/chef/compliance/profile_collection.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/compliance/profile_collection.rb b/lib/chef/compliance/profile_collection.rb index d85d04e825..919abe0c51 100644 --- a/lib/chef/compliance/profile_collection.rb +++ b/lib/chef/compliance/profile_collection.rb @@ -41,7 +41,7 @@ class Chef def from_file(path, cookbook_name) new_profile = Profile.from_file(events, path, cookbook_name) self << new_profile - events.compliance_profile_loaded(new_profile) + events&.compliance_profile_loaded(new_profile) end # @return [Boolean] if any of the profiles are enabled |