summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2016-05-06 09:15:20 -0500
committerSamuel Giddins <segiddins@segiddins.me>2016-05-06 09:15:20 -0500
commit43b429171f629126aeca1dc0551ce9d11c71dbb3 (patch)
tree125dc9067bcd2b384fbb33e43a47d6dae74b9c13
parentd272105d8f1d614520ca89a9dcc198a34f927e59 (diff)
downloadbundler-seg-install-no-no-install.tar.gz
[Install] Don't set :no_install unecessarilyseg-install-no-no-install
-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 758decfa24..1171a9cdd9 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}"