File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -28,9 +28,16 @@ def self.command(name)
2828 config = File . expand_path ( "~/.spring.rb" )
2929 require config if File . exist? ( config )
3030
31- # If the config/spring.rb contains requires for commands from other gems,
32- # then we need to be under bundler.
33- require "bundler/setup"
31+ # We force the TTY so bundler doesn't show a backtrace in case gems are missing.
32+ old_env = ENV [ "BUNDLER_FORCE_TTY" ]
33+ ENV [ "BUNDLER_FORCE_TTY" ] = "true"
34+ begin
35+ # If the config/spring.rb contains requires for commands from other gems,
36+ # then we need to be under bundler.
37+ require "bundler/setup"
38+ ensure
39+ ENV [ "BUNDLER_FORCE_TTY" ] = old_env
40+ end
3441
3542 # Auto-require any Spring extensions which are in the Gemfile
3643 Gem ::Specification . map ( &:name ) . grep ( /^spring-/ ) . each do |command |
You can’t perform that action at this time.
0 commit comments