Skip to content

Commit

Permalink
Update lib/puppet_metadata/github_actions.rb
Browse files Browse the repository at this point in the history
Co-authored-by: Ewoud Kohl van Wijngaarden <[email protected]>
  • Loading branch information
jhoblitt and ekohl authored Oct 30, 2023
1 parent 4bec0cb commit bca1b75
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/puppet_metadata/github_actions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def puppet_version_below_minimum?(version)

def os_release_to_beaker_setfile(os, release, puppet_collection)
if options[:hosts]
setfiles = options[:hosts].collect do |host|
setfiles = options[:hosts].filter_map do |host|
PuppetMetadata::Beaker.os_release_to_setfile(
os,
release,
Expand All @@ -150,8 +150,7 @@ def os_release_to_beaker_setfile(os, release, puppet_collection)
)
end

# check for os/release pairs that don't have a setfile
return setfiles[0] if setfiles[0].nil?
return if setfiles.empty?

# merge the setfile strings
[setfiles.collect { |setfile| setfile[0] }.join('-'), setfiles[0][1]]
Expand Down

0 comments on commit bca1b75

Please sign in to comment.