Skip to content

cargo-cleanme v0.2.3

Choose a tag to compare

@github-actions github-actions released this 07 Oct 16:28
· 131 commits to main since this release
Immutable release. Only release title and notes can be modified.

Fixed — the installer now makes cargo-cleanme findable

The POSIX installer reported success while a new terminal could not find the
binary.
It installs a normal user account's copy into $HOME/.local/bin,
which is not on PATH by default on a stock macOS account. It detected that,
printed export PATH=… for you to run yourself, and exited 0 — so a first
install left a working binary that a newly opened terminal could not resolve
until you performed the printed step by hand.

A default non-root install now appends one bounded, guarded block to a single
startup file, after the verified binary is in place:

# >>> cargo-cleanme installer PATH >>>
case ":$PATH:" in
  *":$HOME/.local/bin:"*) ;;
  *) export PATH="$HOME/.local/bin:$PATH" ;;
esac
# <<< cargo-cleanme installer PATH <<<

It is idempotent, so re-running the installer adds nothing. Delete the markers
and everything between them to remove it.

The installer cannot change the PATH of the shell that invoked it — a
piped child cannot mutate its already-running parent — so it still prints the
export for the current shell. Open a new terminal, or paste it yourself.

Which file is used: $ZDOTDIR/.zshrc when ZDOTDIR is an absolute path and
$HOME/.zshrc otherwise for zsh; $HOME/.bashrc for bash on Linux; and on
macOS the first existing file among $HOME/.bash_profile, $HOME/.bash_login,
$HOME/.profile, else a new $HOME/.bash_profile, because Terminal there
starts a login shell.

Nothing is written when it should not be: a --dir destination (your
explicit choice), a root/system install, a shell that is not zsh or bash, an
unset or invalid ZDOTDIR, or a target that is a symlink, a directory, a FIFO,
or unwritable. The installer never sources, evaluates, or command-substitutes
the file it writes, never creates a directory to put a dotfile into, and never
follows a symlink. A failed write prints the manual step and leaves the
already-verified binary installed.

Added

  • install.sh --no-shell-profile — install the binary and print the manual
    PATH guidance, but write no startup file.

Changed

  • install.sh --no-path is now the broad opt-out: no startup-file mutation
    and no PATH output. It previously suppressed only the output. This is a
    deliberate strengthening for existing scripted callers — one that already
    opted out of PATH handling will not acquire a new side effect after
    upgrading.

install.ps1 and all Windows environment-variable handling are unchanged.

Verification

The installer fixture suite gained 19 cases that assert the state transition
rather than the presence of guidance text — the earlier assertion passed on a
printed instruction, which is how the defect survived a release cycle. Each was
shown to fail against a mutated wrapper. A hosted macOS lane starts a fresh
zsh -l -i with a fixture-owned HOME and asserts it resolves the exact
installed binary, and that the same shell does not resolve it once the profile
entry is removed.

No CLI, JSON, or release-asset contract changed in this release.