Skip to content

install-cli.sh says 'verified on your PATH' but the current shell can't find tracebloc #304

Description

@saadqbal

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:

  1. 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').
  2. _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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions