diff --git a/Gemfile b/Gemfile index 4df2917a..e71101d8 100644 --- a/Gemfile +++ b/Gemfile @@ -5,9 +5,6 @@ source ENV['GEM_SOURCE'] || 'https://rubygems.org' # Disable analytics when running in development ENV['BOLT_DISABLE_ANALYTICS'] = 'true' -# Disable warning that Bolt may be installed as a gem -ENV['BOLT_GEM'] = 'true' - gemspec # Optional paint gem for rainbow outputter diff --git a/lib/bolt/cli.rb b/lib/bolt/cli.rb index 803cf32a..13d50050 100644 --- a/lib/bolt/cli.rb +++ b/lib/bolt/cli.rb @@ -466,7 +466,6 @@ def execute(options) # FINALIZING SETUP # - check_gem_install warn_inventory_overrides_cli(config, options) submit_screen_view(analytics, config, inventory, options) options[:targets] = process_target_list(plugins, @rerun, options) @@ -769,23 +768,6 @@ def execute(options) content end - # Check and warn if Bolt is installed as a gem. - # - private def check_gem_install - if ENV['BOLT_GEM'].nil? && incomplete_install? - msg = <<~MSG.chomp - Bolt might be installed as a gem. To use Bolt reliably and with all of its - dependencies, uninstall the 'bolt' gem and install Bolt as a package: - https://puppet.com/docs/bolt/latest/bolt_installing.html - - If you meant to install Bolt as a gem and want to disable this warning, - set the BOLT_GEM environment variable. - MSG - - Bolt::Logger.warn("gem_install", msg) - end - end - # Print a fatal error. Print using the outputter if it's configured. # Otherwise, mock the output by printing directly to stdout. # diff --git a/spec/integration/transport/local_spec.rb b/spec/integration/transport/local_spec.rb index cde851af..822a91c9 100644 --- a/spec/integration/transport/local_spec.rb +++ b/spec/integration/transport/local_spec.rb @@ -83,7 +83,7 @@ def make_target expect(runner.upload(target, file.path, dest, run_as: user).message).to match(/Uploaded/) expect(runner.run_command(target, "cat #{dest}", run_as: user)['stdout']).to eq(contents) expect(runner.run_command(target, "stat -c %U #{dest}", run_as: user)['stdout'].chomp).to eq(user) - expect(runner.run_command(target, "stat -c %G #{dest}", run_as: user)['stdout'].chomp).to eq('docker') + expect(runner.run_command(target, "stat -c %G #{dest}", run_as: user)['stdout'].chomp).to eq('runner') end runner.run_command(target, "rm #{dest}", sudoable: true, run_as: user) diff --git a/spec/unit/cli_spec.rb b/spec/unit/cli_spec.rb index 9857776f..2358dadd 100644 --- a/spec/unit/cli_spec.rb +++ b/spec/unit/cli_spec.rb @@ -485,24 +485,6 @@ end end - describe 'checking for gem install' do - it 'displays a warning when Bolt is installed as a gem' do - with_env_vars('BOLT_GEM' => nil) do - allow(cli).to receive(:incomplete_install?).and_return(true) - expect(Bolt::Logger).to receive(:warn).with('gem_install', anything) - cli.execute({}) - end - end - - it 'does not display a warning when BOLT_GEM is set' do - with_env_vars('BOLT_GEM' => 'true') do - allow(cli).to receive(:incomplete_install?).and_return(true) - cli.execute({}) - expect(Bolt::Logger).not_to receive(:warn).with('gem_install', anything) - end - end - end - describe 'analytics' do before(:each) do allow(cli).to receive(:submit_screen_view).and_call_original