Skip to content

Commit 2da00ee

Browse files
Don't supress non-spring load errors in binstub
Without this change, the spring binstub supresses unrelated load errors, eg. due to errors in initializers or loaded gems. This change causes the binstub to only ignore a missing spring loader or gem.
1 parent c87e7f6 commit 2da00ee

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/spring/client/binstub.rb

+3-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ class Binstub < Command
1313
# should cause the "unsprung" version of the command to run.
1414
LOADER = <<CODE
1515
begin
16-
load File.expand_path('../spring', __FILE__)
17-
rescue LoadError
16+
load spring_loader = File.expand_path('../spring', __FILE__)
17+
rescue LoadError => e
18+
raise unless e.message.end_with? spring_loader, 'spring/binstub'
1819
end
1920
CODE
2021

0 commit comments

Comments
 (0)