Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Updating/Fetching: Don't print progress bar if STDOUT is not a tty, STDIN doesn't matter here
Bryan Drewery committed 11 years ago
commit 8c67e668750c653c0429168d7b0120af615e9b95
parent ff3f553
1 file changed +3 -3
modified src/event.c
@@ -343,21 +343,21 @@ event_callback(void *data, struct pkg_event *ev)
		warnx("DEVELOPER_MODE: %s", ev->e_pkg_error.msg);
		break;
	case PKG_EVENT_UPDATE_ADD:
-
		if (quiet || !isatty(fileno(stdin)))
+
		if (quiet || !isatty(STDOUT_FILENO))
			break;
		printf("\rPushing new entries %d/%d", ev->e_upd_add.done, ev->e_upd_add.total);
		if (ev->e_upd_add.total == ev->e_upd_add.done)
			printf("\n");
		break;
	case PKG_EVENT_UPDATE_REMOVE:
-
		if (quiet || !isatty(fileno(stdin)))
+
		if (quiet || !isatty(STDOUT_FILENO))
			break;
		printf("\rRemoving entries %d/%d", ev->e_upd_remove.done, ev->e_upd_remove.total);
		if (ev->e_upd_remove.total == ev->e_upd_remove.done)
			printf("\n");
		break;
	case PKG_EVENT_FETCHING:
-
		if (quiet || !isatty(fileno(stdin)))
+
		if (quiet || !isatty(STDOUT_FILENO))
			break;
		if (fetched == 0) {
			filename = strrchr(ev->e_fetching.url, '/');