diff options
author | Terence Lee <hone02@gmail.com> | 2012-12-17 20:07:31 -0500 |
---|---|---|
committer | Terence Lee <hone02@gmail.com> | 2012-12-23 20:15:16 -0500 |
commit | d80d79b095195c243e9dd2108e28783324df4eed (patch) | |
tree | 5c0fb4fb13bfa3bad1860d805ac506d3816e4cac | |
parent | d1c555f2e4878ae2d03d802c48c782e36854ace0 (diff) | |
download | bundler-d80d79b095195c243e9dd2108e28783324df4eed.tar.gz |
`bundle install --binstubs ""` will remove binstubs option
-rw-r--r-- | lib/bundler/cli.rb | 3 | ||||
-rw-r--r-- | spec/runtime/executable_spec.rb | 12 |
2 files changed, 14 insertions, 1 deletions
diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb index f42b9d56bd..3201f2315b 100644 --- a/lib/bundler/cli.rb +++ b/lib/bundler/cli.rb @@ -216,7 +216,8 @@ module Bundler Bundler.settings[:path] = "vendor/bundle" if opts[:deployment] Bundler.settings[:path] = opts[:path] if opts[:path] Bundler.settings[:path] ||= "bundle" if opts[:standalone] - Bundler.settings[:bin] = opts["binstubs"] if opts[:binstubs] + Bundler.settings[:bin] = opts["binstubs"] if opts["binstubs"] + Bundler.settings[:bin] = nil if opts["binstubs"] && opts["binstubs"].empty? Bundler.settings[:shebang] = opts["shebang"] if opts[:shebang] Bundler.settings[:no_prune] = true if opts["no-prune"] Bundler.settings[:disable_shared_gems] = Bundler.settings[:path] ? '1' : nil diff --git a/spec/runtime/executable_spec.rb b/spec/runtime/executable_spec.rb index bafa6310c7..34d5bba7c9 100644 --- a/spec/runtime/executable_spec.rb +++ b/spec/runtime/executable_spec.rb @@ -99,6 +99,18 @@ describe "Running bin/* commands" do expect(bundled_app("bin/rackup")).not_to exist end + it "allows you to stop installing binstubs" do + bundle "install --binstubs bin/" + bundled_app("bin/rackup").rmtree + bundle "install --binstubs \"\"" + + expect(bundled_app("bin/rackup")).not_to exist + #expect(bundled_app("rackup")).not_to exist + + bundle "config bin" + expect(out).to include("You have not configured a value for `bin`") + end + it "remembers that the option was specified" do gemfile <<-G source "file://#{gem_repo1}" |