From 43b429171f629126aeca1dc0551ce9d11c71dbb3 Mon Sep 17 00:00:00 2001 From: Samuel Giddins Date: Fri, 6 May 2016 09:15:20 -0500 Subject: [Install] Don't set :no_install unecessarily --- lib/bundler/cli.rb | 4 ++-- spec/commands/install_spec.rb | 10 ++++++++++ 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}" -- cgit v1.2.1