Skip to content

Commit

Permalink
(GH-422) - Add Safe Navigation Operator to hash['ref']
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanbreen28 committed Feb 1, 2024
1 parent ce3a8e2 commit b545f3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/puppetlabs_spec_helper/tasks/fixtures.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b545f3f

Please sign in to comment.