Skip to content

Commit f3ec7ab

Browse files
committed
scalar diagnose: accommodate Scalar's Functional Tests
Those tests specifically verify that the `.zip` file path is shown on `stdout`. Let's do that again, under the assumption that there are scripts out there that rely on this behavior. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent 3e45ffb commit f3ec7ab

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

diagnose.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -351,10 +351,13 @@ int create_diagnostics_archive(struct strbuf *zip_path, enum diagnose_mode mode)
351351
goto diagnose_cleanup;
352352
}
353353

354-
fprintf(stderr, "\n"
355-
"Diagnostics complete.\n"
356-
"All of the gathered info is captured in '%s'\n",
357-
zip_path->buf);
354+
strbuf_reset(&buf);
355+
strbuf_addf(&buf, "\n"
356+
"Diagnostics complete.\n"
357+
"All of the gathered info is captured in '%s'\n",
358+
zip_path->buf);
359+
write_or_die(stdout_fd, buf.buf, buf.len);
360+
write_or_die(2, buf.buf, buf.len);
358361

359362
diagnose_cleanup:
360363
if (archiver_fd >= 0) {

0 commit comments

Comments
 (0)