summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHomu <homu@barosl.com>2016-05-07 04:36:58 +0900
committerSamuel Giddins <segiddins@segiddins.me>2016-05-06 16:48:41 -0500
commitefa7b287a1a9f5bc0f867ecb3908cf5827175bda (patch)
treec2363506af9700580f90b10bfc2988ae1d01046d
parent3ffc23ed7cb1279ed37201ea48086d418666068d (diff)
downloadbundler-efa7b287a1a9f5bc0f867ecb3908cf5827175bda.tar.gz
Auto merge of #4530 - bundler:seg-install-no-no-install, r=indirect
[Install] Don't set :no_install unecessarily
-rw-r--r--lib/bundler/cli.rb4
-rw-r--r--spec/commands/install_spec.rb10
2 files changed, 12 insertions, 2 deletions
diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb
index c2d96d8112..dc006f2959 100644
--- a/lib/bundler/cli.rb
+++ b/lib/bundler/cli.rb
@@ -171,10 +171,10 @@ module Bundler
def install
require "bundler/cli/install"
no_install = Bundler.settings[:no_install]
- Bundler.settings[:no_install] = false
+ Bundler.settings[:no_install] = false if no_install == true
Install.new(options.dup).run
ensure
- Bundler.settings[:no_install] = no_install
+ Bundler.settings[:no_install] = no_install unless no_install.nil?
end
desc "update [OPTIONS]", "update the current environment"
diff --git a/spec/commands/install_spec.rb b/spec/commands/install_spec.rb
index e48d5009ae..efefdbef4f 100644
--- a/spec/commands/install_spec.rb
+++ b/spec/commands/install_spec.rb
@@ -31,6 +31,16 @@ describe "bundle install with gem sources" do
expect(bundled_app("Gemfile.lock")).to exist
end
+ it "does not create ./.bundle by default" do
+ gemfile <<-G
+ source "file://#{gem_repo1}"
+ gem "rack"
+ G
+
+ bundle :install # can't use install_gemfile since it sets retry
+ expect(bundled_app(".bundle")).not_to exist
+ end
+
it "creates lock files based on the Gemfile name" do
gemfile bundled_app("OmgFile"), <<-G
source "file://#{gem_repo1}"