about summary refs log tree commit diff
path: root/third_party/cgit/ui-snapshot.c
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/cgit/ui-snapshot.c')
-rw-r--r--third_party/cgit/ui-snapshot.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/third_party/cgit/ui-snapshot.c b/third_party/cgit/ui-snapshot.c
index 18361a6553..280139355a 100644
--- a/third_party/cgit/ui-snapshot.c
+++ b/third_party/cgit/ui-snapshot.c
@@ -37,6 +37,9 @@ static int write_archive_type(const char *format, const char *hex, const char *p
 	/* strvec guarantees a trailing NULL entry. */
 	memcpy(nargv, argv.v, sizeof(char *) * (argv.nr + 1));
 
+	if (fflush(stdout))
+		return errno;
+
 	result = write_archive(argv.nr, nargv, NULL, the_repository, NULL, 0);
 	strvec_clear(&argv);
 	free(nargv);