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

Unified Diff: sdk/lib/_internal/pub_generated/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_generated/lib/src/progress.dart
diff --git a/sdk/lib/_internal/pub_generated/lib/src/progress.dart b/sdk/lib/_internal/pub_generated/lib/src/progress.dart
index d74da5627ba495a67a223760541ac245f457c7e3..483157d2f6a6e552633edd56ec45e5ef8bc573d9 100644
--- a/sdk/lib/_internal/pub_generated/lib/src/progress.dart
+++ b/sdk/lib/_internal/pub_generated/lib/src/progress.dart
@@ -49,10 +49,11 @@ class Progress {
return;
}
- _update();
_timer = new Timer.periodic(new Duration(milliseconds: 100), (_) {
_update();
});
+
+ _update();
}
/// Stops the progress indicator.
@@ -89,11 +90,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)} ");
}
}
« sdk/lib/_internal/pub/lib/src/log.dart ('K') | « sdk/lib/_internal/pub_generated/lib/src/log.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698