Auto merge of #5002 - lzutao:fmt-fallout, r=flip1995

build: Use rustfmt from lastest nightly that contains it

changelog: none
This commit is contained in:
bors 2020-01-07 07:10:58 +00:00
commit 79509bed5d
1 changed files with 5 additions and 1 deletions

View File

@ -38,7 +38,11 @@ install:
- |
if [[ -z ${INTEGRATION} ]]; then
if ! rustup component add rustfmt; then
cargo install --git https://github.com/rust-lang/rustfmt --bin rustfmt
TARGET=$(rustc -Vv | awk '/host/{print $2}')
NIGHTLY=$(curl -s "https://rust-lang.github.io/rustup-components-history/${TARGET}/rustfmt")
curl -sSL "https://static.rust-lang.org/dist/${NIGHTLY}/rustfmt-nightly-${TARGET}.tar.xz" | \
tar -xJf - --strip-components=3 -C ~/.cargo/bin
rm -rf ~/.cargo/bin/doc
fi
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
. $HOME/.nvm/nvm.sh