-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Warn developers when uninstalling a dependency #1498
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
Suggested in #1084. Made the existing warning output entirely to STDERR, because previously the first line went to STDERR and subsequent ones went to STDOUT.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -376,6 +376,14 @@ def ignore_interrupts(opt = nil) | |
trap("INT", std_trap) | ||
end | ||
|
||
def capture_stderr | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Think you can use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeh, consolidation there makes sense although might want to tweak the name if we do that too. Definitely one for another PR 👍 |
||
old, $stderr = $stderr, StringIO.new | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
yield | ||
$stderr.string | ||
ensure | ||
$stderr = old | ||
end | ||
|
||
def nostdout | ||
if ARGV.verbose? | ||
yield | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will merge this as-is but would be nice to refactor this to use
EOS.undent
and a bunch of variables declared before instead. Similarly below.