aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel <daniel@novoed.com>2014-10-06 14:19:55 -0700
committerDaniel <daniel@novoed.com>2014-10-06 14:19:55 -0700
commit68623186adf8beb6cd7fade38a7c6c42804c2738 (patch)
tree96ffe78a12d50e6e9e74a74f094b78e714562ca1
parent5376971c8749cdc1bc89f097287a1d2ab03d7370 (diff)
downloadbundler-68623186adf8beb6cd7fade38a7c6c42804c2738.tar.gz
spec.name fails if spec is still nil
spec.name fails if spec is still nil
-rw-r--r--lib/bundler/rubygems_integration.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bundler/rubygems_integration.rb b/lib/bundler/rubygems_integration.rb
index e73c2020..38729979 100644
--- a/lib/bundler/rubygems_integration.rb
+++ b/lib/bundler/rubygems_integration.rb
@@ -306,12 +306,12 @@ module Bundler
if exec_name
spec = specs.find { |s| s.executables.include?(exec_name) }
+ spec or raise Gem::Exception, "can't find executable #{exec_name}"
unless spec.name == name
warn "Bundler is using a binstub that was created for a different gem.\n" \
"This is deprecated, in future versions you may need to `bundle binstub #{name}` " \
"to work around a system/bundle conflict."
end
- spec or raise Gem::Exception, "can't find executable #{exec_name}"
else
spec = specs.find { |s| s.name == name }
exec_name = spec.default_executable or raise Gem::Exception, "no default executable for #{spec.full_name}"