| Index: sdk/lib/_internal/pub_generated/lib/src/log.dart
|
| diff --git a/sdk/lib/_internal/pub_generated/lib/src/log.dart b/sdk/lib/_internal/pub_generated/lib/src/log.dart
|
| index 2b8cb4aed223209427e15fee9fc60398d3d4eae7..d1a437c644445e487349566e7bc288a0e1226d96 100644
|
| --- a/sdk/lib/_internal/pub_generated/lib/src/log.dart
|
| +++ b/sdk/lib/_internal/pub_generated/lib/src/log.dart
|
| @@ -42,9 +42,6 @@ const _MAX_TRANSCRIPT = 10000;
|
| /// [recordTranscript()] is called.
|
| Transcript<Entry> _transcript;
|
|
|
| -/// All currently-running progress indicators.
|
| -final _progresses = new Set<Progress>();
|
| -
|
| /// The currently-animated progress indicator, if any.
|
| ///
|
| /// This will also be in [_progresses].
|
| @@ -376,13 +373,10 @@ void dumpTranscript() {
|
| /// information will only be visible at [Level.FINE].
|
| Future progress(String message, Future callback(), {bool fine: false}) {
|
| _stopProgress();
|
| +
|
| var progress = new Progress(message, fine: fine);
|
| _animatedProgress = progress;
|
| - _progresses.add(progress);
|
| - return callback().whenComplete(() {
|
| - progress.stop();
|
| - _progresses.remove(progress);
|
| - });
|
| + return callback().whenComplete(progress.stop);
|
| }
|
|
|
| /// Stops animating the running progress indicator, if currently running.
|
| @@ -391,6 +385,30 @@ void _stopProgress() {
|
| _animatedProgress = null;
|
| }
|
|
|
| +/// The number of outstanding calls to [muteProgress] that have not been unmuted
|
| +/// yet.
|
| +int _numMutes = 0;
|
| +
|
| +/// Whether progress animation should be muted or not.
|
| +bool get isMuted => _numMutes > 0;
|
| +
|
| +/// Stops animating any ongoing progress.
|
| +///
|
| +/// This is called before spawning Git since Git sometimes writes directly to
|
| +/// the terminal to ask for login credentials, which would then get overwritten
|
| +/// by the progress animation.
|
| +///
|
| +/// Each call to this must be paired with a call to [unmuteProgress].
|
| +void muteProgress() {
|
| + _numMutes++;
|
| +}
|
| +
|
| +/// Resumes animating any ongoing progress once all calls to [muteProgress]
|
| +/// have made their matching [unmuteProgress].
|
| +void unmuteProgress() {
|
| + _numMutes--;
|
| +}
|
| +
|
| /// Wraps [text] in the ANSI escape codes to make it bold when on a platform
|
| /// that supports that.
|
| ///
|
|
|