Skip to content

update prints an install.sh path that may not exist, with no fallback #1632

Description

@DeusData

Filed from discussion #1560. Reported on 0.10.2 and still present on 0.10.4, with no tracking issue. Verified in the code, not only from the report.

Symptom

codebase-memory-mcp update tells the user to run a file that may not exist:

bash "/home/<user>/.local/bin/install.sh"
No such file or directory

Verified mechanism

src/cli/cli.c:12021 composes <self_dir>/install.sh and prints it. The only guard is have_dir, which tests whether the resolved path contains a separator — it never checks that install.sh is actually there.

It often is not. install.sh:335 places the updater from the archive copy, and when that fails it degrades to a soft note: could not place install.sh and continues. So every curl | bash install whose archive copy did not land ends up with an update command that points at nothing.

The user is left with a command that looks authoritative, fails immediately, and gives no alternative.

Why this is not #1544

#1544 is closed and only restored acceptance of the --ui / --standard flags. Different failure.

Fix

Cheap and self-contained: stat the path before printing it, and when it is absent fall back to the documented one-liner from the README rather than a path we cannot honour. Roughly:

  • install.sh present → print it, as today
  • absent → print the curl … | bash / irm … | iex command for the platform

Worth doing carefully rather than quickly: the fallback must match what the docs actually publish, or we replace a broken instruction with a wrong one.

Thanks @iandol for reporting this alongside everything else — this one is small, real, and would have gone unnoticed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ux/behaviorDisplay bugs, docs, adoption UX

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions