diff options
author | Sam Schenkman-Moore <samsm@samsm.com> | 2013-10-03 11:35:45 -0400 |
---|---|---|
committer | Andre Arko <andre@arko.net> | 2013-12-18 22:27:03 -0800 |
commit | 414fed3a3dd08559ee0ad18825273ad57bbf7082 (patch) | |
tree | 14ca997b21477601797dc5aa41f060d5a0acef52 | |
parent | 89235d86ec81006f5647fcd383af981690b3264c (diff) | |
download | bundler-414fed3a3dd08559ee0ad18825273ad57bbf7082.tar.gz |
Deprecation message for when a gem's binstub is running another gem's bin.
closes #2659
-rw-r--r-- | lib/bundler/rubygems_integration.rb | 5 | ||||
-rw-r--r-- | spec/commands/exec_spec.rb | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/bundler/rubygems_integration.rb b/lib/bundler/rubygems_integration.rb index ae970af7d5..b9b218e0c2 100644 --- a/lib/bundler/rubygems_integration.rb +++ b/lib/bundler/rubygems_integration.rb @@ -291,6 +291,11 @@ module Bundler if exec_name spec = specs.find { |s| s.executables.include?(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 } diff --git a/spec/commands/exec_spec.rb b/spec/commands/exec_spec.rb index 0e20b4685f..52b93565de 100644 --- a/spec/commands/exec_spec.rb +++ b/spec/commands/exec_spec.rb @@ -129,6 +129,7 @@ describe "bundle exec" do bundle "exec rackup" expect(out).to eq("0.9.1") + expect(err).to match("deprecated") Dir.chdir bundled_app2 do bundle "exec rackup" |