Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Progress bar: If not in a TTY, show progress_message after interruption on next tick
Bryan Drewery committed 11 years ago
commit 94ae40c32a5ad0f3d6290729a3664682226f85b5
parent 3ff71ca
1 file changed +7 -3
modified src/event.c
@@ -367,11 +367,15 @@ progressbar_start(const char *pmsg)
void
progressbar_tick(int64_t current, int64_t total)
{
-
	if (!quiet) {
+
	if (!quiet && progress_started) {
		if (isatty(STDOUT_FILENO))
			draw_progressbar(current, total);
-
		else if (progress_started && current >= total)
-
			progressbar_stop();
+
		else {
+
			if (progress_interrupted)
+
				printf("%s...", progress_message);
+
			if (current >= total)
+
				progressbar_stop();
+
		}
	}
	progress_interrupted = false;
}