Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cargo install --list does not recognize the installed binary #30

Open
NinoScript opened this issue Oct 8, 2024 · 0 comments
Open

cargo install --list does not recognize the installed binary #30

NinoScript opened this issue Oct 8, 2024 · 0 comments

Comments

@NinoScript
Copy link

I have a script that checks cargo install --list to see if cargo-edit is installed.
From cargo-edit, we use the cargo set-version subcommand. In this case, I can modify the script to check for the cargo-set-version binary instead. Still, ideally cargo install --list should work as usual, or a note could be left in the README about this caveat.


After installing, the $PATH looks correct:

$ echo $PATH
/home/runner/.cargo-install/cargo-edit/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

The contents of /home/runner/.cargo-install/cargo-edit/bin look correct too:

$ ls /home/runner/.cargo-install/cargo-edit/**/*
/home/runner/.cargo-install/cargo-edit/bin/cargo-add
/home/runner/.cargo-install/cargo-edit/bin/cargo-rm
/home/runner/.cargo-install/cargo-edit/bin/cargo-set-version
/home/runner/.cargo-install/cargo-edit/bin/cargo-upgrade

But cargo install --list does not list cargo-edit as being installed:

$ cargo install --list
bindgen-cli v0.70.1:
    bindgen
cargo-audit v0.20.1:
    cargo-audit
cargo-outdated v0.15.0:
    cargo-outdated
cbindgen v0.27.0:
    cbindgen

Here's how it looks after installing cargo-edit the normal way (i.e. without baptiste0928/cargo-install)

$ cargo install --list
[…]
cargo-edit v0.13.0:
    cargo-add
    cargo-rm
    cargo-set-version
    cargo-upgrade
[…]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant