diff options
author | Pranay Singh <i5singh.pranay@gmail.com> | 2022-05-10 15:59:09 +0530 |
---|---|---|
committer | Pranay Singh <i5singh.pranay@gmail.com> | 2022-05-10 15:59:09 +0530 |
commit | bf51df45162be5543fe142013080a7601399a1d7 (patch) | |
tree | 6307bc5678af9282c938a9cec513ed7ac5c2ad52 | |
parent | 630f79c89bb25bf47de901e91dadd468a20d5a9d (diff) | |
download | chef-bf51df45162be5543fe142013080a7601399a1d7.tar.gz |
adding exception to handle for nil for events
Signed-off-by: Pranay Singh <i5singh.pranay@gmail.com>
-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 |