Skip to content

Commit a69b309

Browse files
dschovdye
authored andcommitted
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 a662645 commit a69b309

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
@@ -385,10 +385,13 @@ int create_diagnostics_archive(struct strbuf *zip_path, enum diagnose_mode mode)
385385
goto diagnose_cleanup;
386386
}
387387

388-
fprintf(stderr, "\n"
389-
"Diagnostics complete.\n"
390-
"All of the gathered info is captured in '%s'\n",
391-
zip_path->buf);
388+
strbuf_reset(&buf);
389+
strbuf_addf(&buf, "\n"
390+
"Diagnostics complete.\n"
391+
"All of the gathered info is captured in '%s'\n",
392+
zip_path->buf);
393+
write_or_die(stdout_fd, buf.buf, buf.len);
394+
write_or_die(2, buf.buf, buf.len);
392395

393396
diagnose_cleanup:
394397
if (archiver_fd >= 0) {

0 commit comments

Comments
 (0)