Skip to content

Commit

Permalink
Merge pull request #80 from ekohl/shorter-directory-names
Browse files Browse the repository at this point in the history
Use shorter directory names for beaker-hostgenerator
  • Loading branch information
ekohl authored Apr 4, 2024
2 parents 3b13c89 + b56aadd commit 4e395c2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/beaker/hypervisor/vagrant.rb
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,12 @@ def initialize(vagrant_hosts, options)
@options = options
@logger = options[:logger]
@hosts = vagrant_hosts
@vagrant_path = File.expand_path(File.join('.vagrant', 'beaker_vagrant_files',
'beaker_' + File.basename(options[:hosts_file])))
vagrant_directory = if options[:hosts_file_generated]
"beaker_hostgenerator_#{@hosts.map(&:name).join('-')}"
else
"beaker_#{File.basename(options[:hosts_file])}"
end
@vagrant_path = File.expand_path(File.join('.vagrant', 'beaker_vagrant_files', vagrant_directory))
@vagrant_file = File.expand_path(File.join(@vagrant_path, 'Vagrantfile'))
@vagrant_env = {}
end
Expand Down

0 comments on commit 4e395c2

Please sign in to comment.