Skip to content

Commit 12d9968

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 <[email protected]>
1 parent c7989a2 commit 12d9968

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
@@ -350,10 +350,13 @@ int create_diagnostics_archive(struct strbuf *zip_path, enum diagnose_mode mode)
350350
goto diagnose_cleanup;
351351
}
352352

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

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

0 commit comments

Comments
 (0)