From b545f3f4afc11166225858d1ac9117ed5f70181a Mon Sep 17 00:00:00 2001 From: jordanbreen28 Date: Thu, 1 Feb 2024 16:30:07 +0000 Subject: [PATCH] (GH-422) - Add Safe Navigation Operator to hash['ref'] --- lib/puppetlabs_spec_helper/tasks/fixtures.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/puppetlabs_spec_helper/tasks/fixtures.rb b/lib/puppetlabs_spec_helper/tasks/fixtures.rb index 02475c13..5d845182 100644 --- a/lib/puppetlabs_spec_helper/tasks/fixtures.rb +++ b/lib/puppetlabs_spec_helper/tasks/fixtures.rb @@ -151,7 +151,7 @@ def validate_fixture_hash!(hash) return hash unless hash['scm'] == 'git' # Forward slashes in the ref aren't allowed. And is probably a branch name. - raise ArgumentError, "The ref for #{hash['target']} is invalid (Contains a forward slash). If this is a branch name, please use the 'branch' setting instead." if hash['ref'].include?('/') + raise ArgumentError, "The ref for #{hash['target']} is invalid (Contains a forward slash). If this is a branch name, please use the 'branch' setting instead." if hash['ref']&.include?('/') hash end