forked from mirror/async-std
Use the latest toolchain with rustfmt available if rustfmt is unavailable on the latest nightly (#155)
This commit is contained in:
parent
481002ee71
commit
5d73776c69
1 changed files with 8 additions and 2 deletions
10
.travis.yml
10
.travis.yml
|
@ -18,8 +18,14 @@ matrix:
|
|||
- name: fmt
|
||||
rust: nightly
|
||||
os: linux
|
||||
before_script:
|
||||
- rustup component add rustfmt
|
||||
before_script: |
|
||||
if ! rustup component add rustfmt; then
|
||||
target=`curl https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/rustfmt`;
|
||||
echo "'rustfmt' is unavailable on the toolchain 'nightly', use the toolchain 'nightly-$target' instead";
|
||||
rustup toolchain install nightly-$target;
|
||||
rustup default nightly-$target;
|
||||
rustup component add rustfmt;
|
||||
fi
|
||||
script:
|
||||
- cargo fmt --all -- --check
|
||||
|
||||
|
|
Loading…
Reference in a new issue