Skip to content

Commit 79509be

Browse files
committed
Auto merge of #5002 - lzutao:fmt-fallout, r=flip1995
build: Use rustfmt from lastest nightly that contains it changelog: none
2 parents a86301f + abd7607 commit 79509be

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.travis.yml

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

0 commit comments

Comments
 (0)