Symptom
Installer's Step 3 prints:
✔ tracebloc CLI installed — verified on your PATH.
but running tracebloc in the same terminal gives tracebloc: command not found.
Root cause
When /usr/local/bin isn't writable (no sudo), the CLI's own installer drops the binary in ~/.local/bin and appends a PATH line to the shell rc. Two problems compound:
scripts/lib/install-cli.sh:150 redirects the CLI installer's stdout into $LOG_FILE, swallowing its own accurate guidance (cli/scripts/install.sh:478–479: 'Added … to your PATH … Open a new terminal — or load it now: . rc').
_cli_on_fresh_path (install-cli.sh:73–78) verifies a freshly-spawned shell ($SHELL -lic / -ic), which sources the just-updated rc and finds the binary — so the success branch (line 93) prints 'verified on your PATH'. But the user's current shell started before ~/.local/bin was added to PATH (Ubuntu ~/.profile only adds it if the dir exists at login) and never re-sourced the rc.
Net: verified-for-a-new-terminal, but no hint that the current shell needs a new terminal or source.
Fix
On the verified-fresh success branch, also check whether the current process can resolve tracebloc (or whether the install dir is already on the live $PATH). If not, print the same 'open a new terminal — or source <rc> now' hint the not-on-fresh-path branch already prints. The fresh-shell probe correctly proves persistence; it just must not imply 'usable right now in this shell' when it isn't.
Acceptance
- Fresh install where the binary lands in
~/.local/bin and the current shell lacks it → message tells the user to open a new terminal or source the rc.
- Install where the current shell already has the binary on PATH → clean 'verified on your PATH', no spurious hint.
Symptom
Installer's Step 3 prints:
but running
traceblocin the same terminal givestracebloc: command not found.Root cause
When
/usr/local/binisn't writable (no sudo), the CLI's own installer drops the binary in~/.local/binand appends a PATH line to the shell rc. Two problems compound:scripts/lib/install-cli.sh:150redirects the CLI installer's stdout into$LOG_FILE, swallowing its own accurate guidance (cli/scripts/install.sh:478–479: 'Added … to your PATH … Open a new terminal — or load it now: . rc')._cli_on_fresh_path(install-cli.sh:73–78) verifies a freshly-spawned shell ($SHELL -lic/-ic), which sources the just-updated rc and finds the binary — so the success branch (line 93) prints 'verified on your PATH'. But the user's current shell started before~/.local/binwas added to PATH (Ubuntu~/.profileonly adds it if the dir exists at login) and never re-sourced the rc.Net: verified-for-a-new-terminal, but no hint that the current shell needs a new terminal or
source.Fix
On the verified-fresh success branch, also check whether the current process can resolve
tracebloc(or whether the install dir is already on the live$PATH). If not, print the same 'open a new terminal — orsource <rc>now' hint the not-on-fresh-path branch already prints. The fresh-shell probe correctly proves persistence; it just must not imply 'usable right now in this shell' when it isn't.Acceptance
~/.local/binand the current shell lacks it → message tells the user to open a new terminal orsourcethe rc.