all_ok is declared at crates/gl/src/doctor.rs:83, written only at :288-290, and read only at
:301-315, where it selects which prose to print. run ends at :319 with an unconditional
Ok(()), there is no early return anywhere in it, and main.rs:171 returns that Result directly.
Both directions, run:
broken (no identity, missing dir, --node http://127.0.0.1:1)
4 x ✗ rows, "Some checks failed. Suggested fixes:" EXIT=0
healthy (real identity, mock node on 127.0.0.1:7999, all 8 rows ✓)
"Everything looks good." EXIT=0
Severity, and why it is low
Nothing consumes the exit code today. Grepped install.sh, install.ps1, .github/, npm/,
docs/, and README.md: every hit is a doc line or a post-install suggestion, with no
gl doctor && ..., no CI step, and no call from quickstart or init. Human users are not misled
either, since failures print a per-row ✗, a "Some checks failed" header, and a remedy per check.
So the impact is scripting and CI only, and speculative until someone writes such a script. Filing it
because a diagnostic whose exit status cannot express failure is a trap waiting for the first person
who does.
The fix is not one line
GITLAWB_NODE unset is classed Fail at doctor.rs:160-164, but --node defaults to
https://node.gitlawb.com and the CLI works fine without the variable. That ✗ was observed firing on
an otherwise-healthy run. So the obvious change, returning Err when any check failed, would make
gl doctor exit non-zero on a stock working install.
Whoever picks this up should re-tier that check first (it is advisory, not a failure), then make the
exit status follow the remaining Fail-class checks: identity missing or unparseable (:98-111),
registration missing or malformed (:128-140), node unreachable or non-2xx (:194-207),
git-remote-gitlawb absent (:241-245), git absent (:268-272). The Warn-class checks (iCaptcha
reachability :219-232, shell-alias shadowing :387, version drift :457) should stay non-fatal.
Not related to #197 / PR #198, which are the same file but concern check_version querying the frozen
Gitlawb/releases repo.
all_okis declared atcrates/gl/src/doctor.rs:83, written only at:288-290, and read only at:301-315, where it selects which prose to print.runends at:319with an unconditionalOk(()), there is no early return anywhere in it, andmain.rs:171returns thatResultdirectly.Both directions, run:
Severity, and why it is low
Nothing consumes the exit code today. Grepped
install.sh,install.ps1,.github/,npm/,docs/, andREADME.md: every hit is a doc line or a post-install suggestion, with nogl doctor && ..., no CI step, and no call fromquickstartorinit. Human users are not misledeither, since failures print a per-row
✗, a "Some checks failed" header, and a remedy per check.So the impact is scripting and CI only, and speculative until someone writes such a script. Filing it
because a diagnostic whose exit status cannot express failure is a trap waiting for the first person
who does.
The fix is not one line
GITLAWB_NODEunset is classed Fail atdoctor.rs:160-164, but--nodedefaults tohttps://node.gitlawb.comand the CLI works fine without the variable. That ✗ was observed firing onan otherwise-healthy run. So the obvious change, returning
Errwhen any check failed, would makegl doctorexit non-zero on a stock working install.Whoever picks this up should re-tier that check first (it is advisory, not a failure), then make the
exit status follow the remaining Fail-class checks: identity missing or unparseable (
:98-111),registration missing or malformed (
:128-140), node unreachable or non-2xx (:194-207),git-remote-gitlawbabsent (:241-245),gitabsent (:268-272). The Warn-class checks (iCaptchareachability
:219-232, shell-alias shadowing:387, version drift:457) should stay non-fatal.Not related to #197 / PR #198, which are the same file but concern
check_versionquerying the frozenGitlawb/releasesrepo.