summaryrefslogtreecommitdiff
path: root/lib/bundler/cli
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2019-12-14 19:49:16 +0900
committerSHIBATA Hiroshi <hsbt@ruby-lang.org>2019-12-15 16:41:10 +0900
commit38002a8adbd98266426940d829429a30af0622a4 (patch)
treedb01bcc2653ba0230a07345c4a3c877246dfe473 /lib/bundler/cli
parente2b192f7d5b4f0e2133bb6cf03cfc609258826be (diff)
Prepare to release bundler-2.1.0
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/2753
Diffstat (limited to 'lib/bundler/cli')
-rw-r--r--lib/bundler/cli/config.rb2
-rw-r--r--lib/bundler/cli/exec.rb15
-rw-r--r--lib/bundler/cli/update.rb2
3 files changed, 14 insertions, 5 deletions
diff --git a/lib/bundler/cli/config.rb b/lib/bundler/cli/config.rb
index 78e035aa02..8d2aba0916 100644
--- a/lib/bundler/cli/config.rb
+++ b/lib/bundler/cli/config.rb
@@ -25,7 +25,7 @@ module Bundler
["config", "get", ARGV[1]]
end
- SharedHelpers.major_deprecation 2,
+ SharedHelpers.major_deprecation 3,
"Using the `config` command without a subcommand [list, get, set, unset] is deprecated and will be removed in the future. Use `bundle #{new_args.join(" ")}` instead."
Base.new(options, name, value, self).run
diff --git a/lib/bundler/cli/exec.rb b/lib/bundler/cli/exec.rb
index 0a1edbdbbd..2bace6e77d 100644
--- a/lib/bundler/cli/exec.rb
+++ b/lib/bundler/cli/exec.rb
@@ -25,12 +25,12 @@ module Bundler
SharedHelpers.set_bundle_environment
if bin_path = Bundler.which(cmd)
if !Bundler.settings[:disable_exec_load] && ruby_shebang?(bin_path)
- return kernel_load(bin_path, *args)
+ return with_verbose_rubygems { kernel_load(bin_path, *args) }
end
- kernel_exec(bin_path, *args)
+ with_verbose_rubygems { kernel_exec(bin_path, *args) }
else
# exec using the given command
- kernel_exec(cmd, *args)
+ with_verbose_rubygems { kernel_exec(cmd, *args) }
end
end
@@ -89,5 +89,14 @@ module Bundler
first_line = File.open(file, "rb") {|f| f.read(possibilities.map(&:size).max) }
possibilities.any? {|shebang| first_line.start_with?(shebang) }
end
+
+ def with_verbose_rubygems
+ old_ui = Gem::DefaultUserInteraction.ui
+ Gem::DefaultUserInteraction.ui = nil
+
+ yield
+ ensure
+ Gem::DefaultUserInteraction.ui = old_ui
+ end
end
end
diff --git a/lib/bundler/cli/update.rb b/lib/bundler/cli/update.rb
index afd386bd54..529dd9c94d 100644
--- a/lib/bundler/cli/update.rb
+++ b/lib/bundler/cli/update.rb
@@ -22,7 +22,7 @@ module Bundler
if Bundler.feature_flag.update_requires_all_flag?
raise InvalidOption, "To update everything, pass the `--all` flag."
end
- SharedHelpers.major_deprecation 2, "Pass --all to `bundle update` to update everything"
+ SharedHelpers.major_deprecation 3, "Pass --all to `bundle update` to update everything"
elsif !full_update && options[:all]
raise InvalidOption, "Cannot specify --all along with specific options."
end