Skip to content

rustup cargo install-upgrade #4852

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

Merged
merged 1 commit into from
Nov 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ cache:
directories:
- $HOME/.cargo
before_cache:
- cargo install -Z install-upgrade cargo-cache --debug
- cargo install cargo-cache --debug
- find $HOME/.cargo/bin/ ! -type d -exec strip {} \;
- cargo cache --autoclean

Expand All @@ -28,7 +28,7 @@ install:
- |
if [[ -z ${INTEGRATION} ]]; then
if ! rustup component add rustfmt; then
cargo install -Z install-upgrade --git https://github.com/rust-lang/rustfmt --bin rustfmt
cargo install --git https://github.com/rust-lang/rustfmt --bin rustfmt
fi
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
. $HOME/.nvm/nvm.sh
Expand Down
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ cache:
- '%USERPROFILE%\.cargo'
# before cache
after_test:
- cargo install -Z install-upgrade cargo-cache --debug
- cargo install cargo-cache --debug
- cargo cache --autoclean

install:
Expand All @@ -27,7 +27,7 @@ install:
- set PATH=%USERPROFILE%\.cargo\bin;%PATH%
- rustup component add rustfmt --toolchain nightly & exit 0 # Format test handles missing rustfmt
- del rust-toolchain
- cargo install -Z install-upgrade rustup-toolchain-install-master
- cargo install rustup-toolchain-install-master
- rustup-toolchain-install-master -f -n master -c rustc-dev
- rustup override set master
- rustc -V
Expand Down
7 changes: 3 additions & 4 deletions setup-toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ set -e

cd "$(dirname "$0")"

ERRNO=0
RTIM_PATH=$(command -v rustup-toolchain-install-master) || ERRNO=$?
RTIM_PATH=$(command -v rustup-toolchain-install-master)
CARGO_HOME=${CARGO_HOME:-$HOME/.cargo}

# Check if people also install RTIM in other locations beside
# ~/.cargo/bin
if [[ "$ERRNO" -ne 0 ]] || [[ "$RTIM_PATH" == $CARGO_HOME/bin/rustup-toolchain-install-master ]]; then
cargo install -Z install-upgrade rustup-toolchain-install-master
if [[ "$RTIM_PATH" == $CARGO_HOME/bin/rustup-toolchain-install-master ]]; then
cargo +nightly install rustup-toolchain-install-master
else
VERSION=$(rustup-toolchain-install-master -V | grep -o "[0-9.]*")
REMOTE=$(cargo search rustup-toolchain-install-master | grep -o "[0-9.]*")
Expand Down