Skip to content

Commit 71b38c2

Browse files
committed
test(logseq-cli): match the doctor status table in the help check
`logseq-cli doctor` prints a per-check status table with no summary line; the OCaml CLI has no "Doctor: ok" string (absent from cli/lib/doctor.ml and the rendered output). The help check grepped for that phantom substring, so it failed even though doctor exited 0 with every check ok. The branch never built far enough to run this check before, so the assertion was never validated. Assert the stable db-worker-script check row instead, preserving the guard against a degenerate banner that exits 0 without rendering the real table.
1 parent be30507 commit 71b38c2

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

modules/_checks/cli-help.nix

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,12 @@ pkgs.runCommand "logseq-cli-help-check" { } ''
3636
echo "$doctor_output" >&2
3737
exit 1
3838
fi
39-
if ! echo "$doctor_output" | ${pkgs.gnugrep}/bin/grep -qF 'Doctor: ok'; then
40-
echo "logseq-cli doctor output missing expected 'Doctor: ok' substring:" >&2
39+
# doctor prints a status table (one row per check), not a summary line; on
40+
# success every row is `ok` and the command exits 0 (gated above). Require the
41+
# db-worker-script check row so a degenerate banner that exits 0 without
42+
# running the real checks is not rubber-stamped.
43+
if ! echo "$doctor_output" | ${pkgs.gnugrep}/bin/grep -qF 'db-worker-script'; then
44+
echo "logseq-cli doctor output missing expected 'db-worker-script' check row:" >&2
4145
echo "$doctor_output" >&2
4246
exit 1
4347
fi

0 commit comments

Comments
 (0)