Skip to content

Commit

Permalink
Merge pull request #126 from StatensPensjonskasse/bug-in-metadata2gha…
Browse files Browse the repository at this point in the history
…-options-parsing

Fix bug in metadata2gha options parsing
  • Loading branch information
h-haaks authored Apr 25, 2024
2 parents d9dcc12 + b734ed2 commit 38b2500
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bin/metadata2gha
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,13 @@ OptionParser.new do |opts|
end
end
opts.on('--beaker-hosts HOSTNAME:ROLES;HOSTNAME:ROLES;...', 'Expand the setfile string to create multiple hosts with custom roles. Roles string; see beaker-hostgenerator') do |opt|
options[:beaker_hosts] = {}
if opt != 'false'
beaker_hosts = {}
opt.split(';').each do |host|
hostname, roles = host.split(':', 2)
options[:beaker_hosts][hostname] = roles
beaker_hosts[hostname] = roles
end
options[:beaker_hosts] = beaker_hosts unless beaker_hosts.empty?
end
end
end.parse!
Expand Down

0 comments on commit 38b2500

Please sign in to comment.