nabijaczleweli / cargo-update

A cargo subcommand for checking and applying updates to installed executables
MIT License
1.22k stars 42 forks source link

Handle $CARGO_INSTALL_ROOT correctly #24

Closed nabijaczleweli closed 7 years ago

nabijaczleweli commented 7 years ago

See: https://github.com/nabijaczleweli/cargo-update/issues/23#issuecomment-281166780

jan-hudec commented 7 years ago

With 6244c95f328de894fe553ca91dbd95a36e9512fa, $CARGO_INSTALL_ROOT works:

$ CARGO_INSTALL_ROOT=$HOME/.local/ cargo install-update -a -l
    Updating registry `https://github.com/rust-lang/crates.io-index`

Package        Installed      Latest   Needs update
cargo-release  v0.7.0-beta.3  v0.7.0   Yes
git-series     v0.9.1         v0.9.1   No
cargo-license  v0.1.2         v0.1.2   No
cargo-tree     v0.10.1        v0.10.1  No
cargo-modules  v0.3.2         v0.3.2   No
cargo-show     v0.2.2         v0.2.2   No
bindgen        v0.22.0        v0.22.0  No
ripgrep        v0.4.0         v0.4.0   No
cargo-readme   v1.1.0         v1.1.0   No

However, without it—with just install.root—it does not:

$ cargo install-update -a -l
    Updating registry `https://github.com/rust-lang/crates.io-index`

Package  Installed  Latest  Needs update

So you are on the right track with this commit, but need to do the same for the option in ~/.cargo/config.

nabijaczleweli commented 7 years ago

Magnificent, I can get at least one thing right

nabijaczleweli commented 7 years ago

Released in v0.7.1