summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2016-02-17 23:12:52 -0600
committerSamuel Giddins <segiddins@segiddins.me>2016-02-17 23:12:52 -0600
commit13e4cc6c8e498ae5daae4862e604e1ca9966544e (patch)
tree69f527e776a5cf9de07996a1b600455d5b847556
parent9c5fb35f874f3ad97b149628787387601d685686 (diff)
downloadbundler-seg-bundle-no-install.tar.gz
[CLI] Ensure `bundle install` will always installseg-bundle-no-install
-rw-r--r--lib/bundler/cli.rb4
-rw-r--r--lib/bundler/settings.rb2
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb
index 1fed1b58f0..da6c7c0dfb 100644
--- a/lib/bundler/cli.rb
+++ b/lib/bundler/cli.rb
@@ -170,7 +170,11 @@ module Bundler
map "i" => "install"
def install
require "bundler/cli/install"
+ no_install = Bundler.settings[:no_install]
+ Bundler.settings[:no_install] = false
Install.new(options.dup).run
+ ensure
+ Bundler.settings[:no_install] = no_install
end
desc "update [OPTIONS]", "update the current environment"
diff --git a/lib/bundler/settings.rb b/lib/bundler/settings.rb
index 634d9dc14a..175c9a76db 100644
--- a/lib/bundler/settings.rb
+++ b/lib/bundler/settings.rb
@@ -3,7 +3,7 @@ require "uri"
module Bundler
class Settings
- BOOL_KEYS = %w(frozen cache_all no_prune disable_local_branch_check disable_shared_gems ignore_messages gem.mit gem.coc silence_root_warning).freeze
+ BOOL_KEYS = %w(frozen cache_all no_prune disable_local_branch_check disable_shared_gems ignore_messages gem.mit gem.coc silence_root_warning no_install).freeze
NUMBER_KEYS = %w(retry timeout redirect ssl_verify_mode).freeze
DEFAULT_CONFIG = { :retry => 3, :timeout => 10, :redirect => 5 }.freeze