summaryrefslogtreecommitdiff
path: root/lib/bundler/cli
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2017-07-19 18:58:09 -0500
committerSamuel Giddins <segiddins@segiddins.me>2017-07-21 09:33:00 -0500
commit01fe509b27b317dd4d640beb9140ab31331ea349 (patch)
treee3884864071b2b35e3a70693e9a25eb7c3184751 /lib/bundler/cli
parent365b4301baedba9b5cf4f1e47a42f65ed028c51b (diff)
downloadbundler-01fe509b27b317dd4d640beb9140ab31331ea349.tar.gz
Add a special bundler binstub that ensures the correct version is activated
Diffstat (limited to 'lib/bundler/cli')
-rw-r--r--lib/bundler/cli/binstubs.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/bundler/cli/binstubs.rb b/lib/bundler/cli/binstubs.rb
index 38863c5e77..acec5741b7 100644
--- a/lib/bundler/cli/binstubs.rb
+++ b/lib/bundler/cli/binstubs.rb
@@ -31,9 +31,8 @@ module Bundler
)
end
- if spec.name == "bundler"
- Bundler.ui.warn "Sorry, Bundler can only be run via RubyGems."
- elsif options[:standalone]
+ if options[:standalone]
+ next Bundler.ui.warn("Sorry, Bundler can only be run via RubyGems.") if gem_name == "bundler"
installer.generate_standalone_bundler_executable_stubs(spec)
else
installer.generate_bundler_executable_stubs(spec, :force => options[:force], :binstubs_cmd => true)