install.sh: point at construct doctor after a fresh install - #1083
Merged
Conversation
A just-installed machine is the likeliest one to be missing a harness CLI, an OAuth login, or a writable state directory — exactly what `doctor` reports. Until now the only way to learn the command exists was `construct --help`, which is the wrong surface for something whose whole job is to be findable when something is already wrong. The installer's own PATH check is also a weaker version of doctor's: a `case` on `$PATH` cannot see a second `construct` shadowing the one it just wrote. Safe to suggest here: doctor never starts a daemon, and a fresh install with no config and no daemon running exits 0 as healthy, so this does not send new users to a wall of warnings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
One line on the installer's closing message:
Why here
A just-installed machine is the likeliest one to be missing a harness CLI, an
OAuth login, or a writable state directory — which is precisely what
doctorchecks. Before this, the only way to discover the command existed was
construct --help, which is the wrong surface for something whose entire jobis to be findable at the moment something is already wrong.
The installer also hand-rolls its own PATH check a few lines up:
That's a weaker version of doctor's
env.pathfinding — acaseon$PATHcan't see a second
constructshadowing the one the installer just wrote.Why it's safe to suggest at this moment
Doctor never starts a daemon, and a fresh install — no config file, no daemon
running, no sessions — reports as healthy and exits 0. Verified against an
isolated home:
26 ok, 10 info, 5 warn, 0 error — construct looks healthy.New users won't be greeted by a wall of warnings for having just installed.
Not changed
construct upgrade— its output is already more specific than a doctorpointer would be. The one state where doctor is relevant post-upgrade is
client/daemon build skew, and upgrade already detects that and prints three
concrete ways to fix it. Redirecting to
doctorthere would be strictlyworse.
onto doctor's harnesses and logins sections), but out of scope for this PR.
sh -n install.shpasses.