File tree Expand file tree Collapse file tree 3 files changed +0
-39
lines changed Expand file tree Collapse file tree 3 files changed +0
-39
lines changed Original file line number Diff line number Diff line change @@ -5,9 +5,6 @@ source ENV['GEM_SOURCE'] || 'https://rubygems.org'
55# Disable analytics when running in development
66ENV [ 'BOLT_DISABLE_ANALYTICS' ] = 'true'
77
8- # Disable warning that Bolt may be installed as a gem
9- ENV [ 'BOLT_GEM' ] = 'true'
10-
118gemspec
129
1310# Optional paint gem for rainbow outputter
Original file line number Diff line number Diff line change @@ -466,7 +466,6 @@ def execute(options)
466466 # FINALIZING SETUP
467467 #
468468
469- check_gem_install
470469 warn_inventory_overrides_cli ( config , options )
471470 submit_screen_view ( analytics , config , inventory , options )
472471 options [ :targets ] = process_target_list ( plugins , @rerun , options )
@@ -769,23 +768,6 @@ def execute(options)
769768 content
770769 end
771770
772- # Check and warn if Bolt is installed as a gem.
773- #
774- private def check_gem_install
775- if ENV [ 'BOLT_GEM' ] . nil? && incomplete_install?
776- msg = <<~MSG . chomp
777- Bolt might be installed as a gem. To use Bolt reliably and with all of its
778- dependencies, uninstall the 'bolt' gem and install Bolt as a package:
779- https://puppet.com/docs/bolt/latest/bolt_installing.html
780-
781- If you meant to install Bolt as a gem and want to disable this warning,
782- set the BOLT_GEM environment variable.
783- MSG
784-
785- Bolt ::Logger . warn ( "gem_install" , msg )
786- end
787- end
788-
789771 # Print a fatal error. Print using the outputter if it's configured.
790772 # Otherwise, mock the output by printing directly to stdout.
791773 #
Original file line number Diff line number Diff line change 485485 end
486486 end
487487
488- describe 'checking for gem install' do
489- it 'displays a warning when Bolt is installed as a gem' do
490- with_env_vars ( 'BOLT_GEM' => nil ) do
491- allow ( cli ) . to receive ( :incomplete_install? ) . and_return ( true )
492- expect ( Bolt ::Logger ) . to receive ( :warn ) . with ( 'gem_install' , anything )
493- cli . execute ( { } )
494- end
495- end
496-
497- it 'does not display a warning when BOLT_GEM is set' do
498- with_env_vars ( 'BOLT_GEM' => 'true' ) do
499- allow ( cli ) . to receive ( :incomplete_install? ) . and_return ( true )
500- cli . execute ( { } )
501- expect ( Bolt ::Logger ) . not_to receive ( :warn ) . with ( 'gem_install' , anything )
502- end
503- end
504- end
505-
506488 describe 'analytics' do
507489 before ( :each ) do
508490 allow ( cli ) . to receive ( :submit_screen_view ) . and_call_original
You can’t perform that action at this time.
0 commit comments