Skip to content

Commit 2f982c5

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 d2ecb32 commit 2f982c5

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

diagnose.c

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

372-
fprintf(stderr, "\n"
373-
"Diagnostics complete.\n"
374-
"All of the gathered info is captured in '%s'\n",
375-
zip_path->buf);
372+
strbuf_reset(&buf);
373+
strbuf_addf(&buf, "\n"
374+
"Diagnostics complete.\n"
375+
"All of the gathered info is captured in '%s'\n",
376+
zip_path->buf);
377+
write_or_die(stdout_fd, buf.buf, buf.len);
378+
write_or_die(2, buf.buf, buf.len);
376379

377380
diagnose_cleanup:
378381
if (archiver_fd >= 0) {

0 commit comments

Comments
 (0)