summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-04-11 23:08:16 +0200
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-04-11 23:08:16 +0200
commitfa3a51c95c92a9e793c2da53c05b8f2c155e905d (patch)
tree5286a26635ec9f4828aaafb914d0ad60d2a635eb
parentb711410759259c863709a585117804ee8b69e2b7 (diff)
downloadbundler-fa3a51c95c92a9e793c2da53c05b8f2c155e905d.tar.gz
Remove `error_on_stderr` setting
-rw-r--r--lib/bundler/feature_flag.rb1
-rw-r--r--lib/bundler/settings.rb1
-rw-r--r--lib/bundler/ui/shell.rb6
-rw-r--r--man/bundle-config.ronn2
-rw-r--r--spec/bundler/ui/shell_spec.rb24
-rw-r--r--spec/support/helpers.rb2
6 files changed, 8 insertions, 28 deletions
diff --git a/lib/bundler/feature_flag.rb b/lib/bundler/feature_flag.rb
index 2b46fc0b1d..82f914525b 100644
--- a/lib/bundler/feature_flag.rb
+++ b/lib/bundler/feature_flag.rb
@@ -36,7 +36,6 @@ module Bundler
settings_flag(:default_install_uses_path) { bundler_3_mode? }
settings_flag(:deployment_means_frozen) { bundler_3_mode? }
settings_flag(:disable_multisource) { bundler_3_mode? }
- settings_flag(:error_on_stderr) { bundler_2_mode? }
settings_flag(:forget_cli_options) { bundler_3_mode? }
settings_flag(:global_path_appends_ruby_scope) { bundler_3_mode? }
settings_flag(:global_gem_cache) { bundler_3_mode? }
diff --git a/lib/bundler/settings.rb b/lib/bundler/settings.rb
index bdd15fe675..10f36ee8b9 100644
--- a/lib/bundler/settings.rb
+++ b/lib/bundler/settings.rb
@@ -28,7 +28,6 @@ module Bundler
disable_platform_warnings
disable_shared_gems
disable_version_check
- error_on_stderr
force_ruby_platform
forget_cli_options
frozen
diff --git a/lib/bundler/ui/shell.rb b/lib/bundler/ui/shell.rb
index 16e3d15713..7136fdfbf9 100644
--- a/lib/bundler/ui/shell.rb
+++ b/lib/bundler/ui/shell.rb
@@ -35,14 +35,12 @@ module Bundler
return if @warning_history.include? msg
@warning_history << msg
- return tell_err(msg, :yellow, newline) if Bundler.feature_flag.error_on_stderr?
- tell_me(msg, :yellow, newline)
+ tell_err(msg, :yellow, newline)
end
def error(msg, newline = nil)
return unless level("error")
- return tell_err(msg, :red, newline) if Bundler.feature_flag.error_on_stderr?
- tell_me(msg, :red, newline)
+ tell_err(msg, :red, newline)
end
def debug(msg, newline = nil)
diff --git a/man/bundle-config.ronn b/man/bundle-config.ronn
index 4e717b4b69..9eb0f0a060 100644
--- a/man/bundle-config.ronn
+++ b/man/bundle-config.ronn
@@ -183,8 +183,6 @@ learn more about their operation in [bundle install(1)](bundle-install.1.html).
* `disable_version_check` (`BUNDLE_DISABLE_VERSION_CHECK`):
Stop Bundler from checking if a newer Bundler version is available on
rubygems.org.
-* `error_on_stderr` (`BUNDLE_ERROR_ON_STDERR`):
- Print Bundler errors to stderr.
* `force_ruby_platform` (`BUNDLE_FORCE_RUBY_PLATFORM`):
Ignore the current machine's platform and install only `ruby` platform gems.
As a result, gems with native extensions will be compiled from source.
diff --git a/spec/bundler/ui/shell_spec.rb b/spec/bundler/ui/shell_spec.rb
index 23a7670dd1..49e1cc52ab 100644
--- a/spec/bundler/ui/shell_spec.rb
+++ b/spec/bundler/ui/shell_spec.rb
@@ -24,13 +24,6 @@ RSpec.describe Bundler::UI::Shell do
it "prints to stderr" do
expect { subject.warn("warning") }.to output("warning\n").to_stderr
end
-
- context "when stderr flag is enabled" do
- before { Bundler.settings.temporary(:error_on_stderr => true) }
- it "prints to stderr" do
- expect { subject.warn("warning!") }.to output("warning!\n").to_stderr
- end
- end
end
describe "#debug" do
@@ -46,19 +39,12 @@ RSpec.describe Bundler::UI::Shell do
expect { subject.error("error!!!") }.to output("error!!!\n").to_stderr
end
- context "when stderr flag is enabled" do
- before { Bundler.settings.temporary(:error_on_stderr => true) }
- it "prints to stderr" do
- expect { subject.error("error!!!") }.to output("error!!!\n").to_stderr
- end
-
- context "when stderr is closed" do
- it "doesn't report anything" do
- output = capture(:stderr, :closed => true) do
- subject.error("Something went wrong")
- end
- expect(output).to_not eq("Something went wrong\n")
+ context "when stderr is closed" do
+ it "doesn't report anything" do
+ output = capture(:stderr, :closed => true) do
+ subject.error("Something went wrong")
end
+ expect(error).to_not eq("Something went wrong\n")
end
end
end
diff --git a/spec/support/helpers.rb b/spec/support/helpers.rb
index 6470b57fb8..53459669e6 100644
--- a/spec/support/helpers.rb
+++ b/spec/support/helpers.rb
@@ -45,7 +45,7 @@ module Spec
end
def err
- Bundler.feature_flag.error_on_stderr? ? last_command.stderr : last_command.stdout
+ last_command.stderr
end
MAJOR_DEPRECATION = /^\[DEPRECATED\]\s*/.freeze