Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(110)

Unified Diff: sdk/lib/_internal/pub/lib/src/progress.dart

Issue 845543003: Mute progress animation while Git is running so it doesn't overwrite credential prompts. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sdk/lib/_internal/pub/lib/src/progress.dart
diff --git a/sdk/lib/_internal/pub/lib/src/progress.dart b/sdk/lib/_internal/pub/lib/src/progress.dart
index 6c0ffdcf2f2dc3d8330991cf503082ad49702692..5029f61af9b4ee4ffc754b3ea9edb988320a9e9e 100644
--- a/sdk/lib/_internal/pub/lib/src/progress.dart
+++ b/sdk/lib/_internal/pub/lib/src/progress.dart
@@ -48,10 +48,11 @@ class Progress {
return;
}
- _update();
_timer = new Timer.periodic(new Duration(milliseconds: 100), (_) {
_update();
});
+
+ _update();
}
/// Stops the progress indicator.
@@ -88,11 +89,11 @@ class Progress {
/// Refreshes the progress line.
void _update() {
+ if (log.isMuted) return;
+
stdout.write(log.format("\r$_message... "));
// Show the time only once it gets noticeably long.
- if (_stopwatch.elapsed.inSeconds > 0) {
- stdout.write(log.gray(_time));
- }
+ if (_stopwatch.elapsed.inSeconds > 0) stdout.write("${log.gray(_time)} ");
}
}

Powered by Google App Engine
This is Rietveld 408576698