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'
5
5
# Disable analytics when running in development
6
6
ENV [ 'BOLT_DISABLE_ANALYTICS' ] = 'true'
7
7
8
- # Disable warning that Bolt may be installed as a gem
9
- ENV [ 'BOLT_GEM' ] = 'true'
10
-
11
8
gemspec
12
9
13
10
# Optional paint gem for rainbow outputter
Original file line number Diff line number Diff line change @@ -466,7 +466,6 @@ def execute(options)
466
466
# FINALIZING SETUP
467
467
#
468
468
469
- check_gem_install
470
469
warn_inventory_overrides_cli ( config , options )
471
470
submit_screen_view ( analytics , config , inventory , options )
472
471
options [ :targets ] = process_target_list ( plugins , @rerun , options )
@@ -769,23 +768,6 @@ def execute(options)
769
768
content
770
769
end
771
770
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
-
789
771
# Print a fatal error. Print using the outputter if it's configured.
790
772
# Otherwise, mock the output by printing directly to stdout.
791
773
#
Original file line number Diff line number Diff line change 485
485
end
486
486
end
487
487
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
-
506
488
describe 'analytics' do
507
489
before ( :each ) do
508
490
allow ( cli ) . to receive ( :submit_screen_view ) . and_call_original
You can’t perform that action at this time.
0 commit comments