Skip to content

Commit

Permalink
scalar diagnose: accommodate Scalar's Functional Tests
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
dscho committed Nov 8, 2023
1 parent 873ce53 commit 2d97972
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions diagnose.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,10 +349,13 @@ int create_diagnostics_archive(struct strbuf *zip_path, enum diagnose_mode mode)
goto diagnose_cleanup;
}

fprintf(stderr, "\n"
"Diagnostics complete.\n"
"All of the gathered info is captured in '%s'\n",
zip_path->buf);
strbuf_reset(&buf);
strbuf_addf(&buf, "\n"
"Diagnostics complete.\n"
"All of the gathered info is captured in '%s'\n",
zip_path->buf);
write_or_die(stdout_fd, buf.buf, buf.len);
write_or_die(2, buf.buf, buf.len);

diagnose_cleanup:
if (archiver_fd >= 0) {
Expand Down

0 comments on commit 2d97972

Please sign in to comment.