@@ -32,7 +32,7 @@ def initialize_beaker
3232def beaker_platform
3333 {
3434 'ubuntu-20.04' => 'ubuntu2004-64a' ,
35- 'macos-latest ' => 'osx11-64a' ,
35+ 'macos-11 ' => 'osx11-64a' ,
3636 'windows-2016' => 'windows2016-64a' ,
3737 'windows-2019' => 'windows2019-64a'
3838 } [ HOST_PLATFORM ]
@@ -48,9 +48,19 @@ def install_puppet_agent
4848 message ( 'INSTALL PUPPET AGENT' )
4949
5050 beaker_puppet_root = run ( 'bundle info beaker-puppet --path' )
51- presuite_file_path = File . join ( beaker_puppet_root . chomp , 'setup' , 'aio' , '010_Install_Puppet_Agent.rb' )
5251
53- run ( "beaker exec pre-suite --pre-suite #{ presuite_file_path } --preserve-state" , './' , env_path_var )
52+ # Bundler/Rubygems can sometimes give output other than the filepath (deprecation warnings, etc.)
53+ begin
54+ if File . exist? ( beaker_puppet_root . chomp )
55+ presuite_file_path = File . join ( beaker_puppet_root . chomp , 'setup' , 'aio' , '010_Install_Puppet_Agent.rb' )
56+
57+ run ( "beaker exec pre-suite --pre-suite #{ presuite_file_path } --preserve-state" , './' , env_path_var )
58+ else
59+ exit
60+ end
61+ rescue SystemExit
62+ puts "`bundle info beaker-puppet --path` produced unexpected output, please address this."
63+ end
5464end
5565
5666def puppet_puppet_bin_dir
0 commit comments