diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/bundler/cli/outdated.rb | 2 | ||||
| -rw-r--r-- | lib/bundler/ui/shell.rb | 12 | ||||
| -rw-r--r-- | lib/bundler/ui/silent.rb | 4 |
3 files changed, 17 insertions, 1 deletions
diff --git a/lib/bundler/cli/outdated.rb b/lib/bundler/cli/outdated.rb index ec42e631bb..64a83fd57e 100644 --- a/lib/bundler/cli/outdated.rb +++ b/lib/bundler/cli/outdated.rb @@ -54,7 +54,7 @@ module Bundler end if options[:parseable] - Bundler.ui.silence(&definition_resolution) + Bundler.ui.progress(&definition_resolution) else definition_resolution.call end diff --git a/lib/bundler/ui/shell.rb b/lib/bundler/ui/shell.rb index 32367a44f0..6df1512a5b 100644 --- a/lib/bundler/ui/shell.rb +++ b/lib/bundler/ui/shell.rb @@ -119,6 +119,10 @@ module Bundler with_level("silent", &blk) end + def progress(&blk) + with_output_stream(:stderr, &blk) + end + def unprinted_warnings [] end @@ -170,6 +174,14 @@ module Bundler ensure @level = original end + + def with_output_stream(symbol) + original = output_stream + self.output_stream = symbol + yield + ensure + @output_stream = original + end end end end diff --git a/lib/bundler/ui/silent.rb b/lib/bundler/ui/silent.rb index 9ca2a8b485..83d31d4b55 100644 --- a/lib/bundler/ui/silent.rb +++ b/lib/bundler/ui/silent.rb @@ -84,6 +84,10 @@ module Bundler yield end + def progress + yield + end + def unprinted_warnings @warnings end |
