Skip to content
This repository was archived by the owner on Oct 30, 2019. It is now read-only.

Use the latest toolchain with rustfmt available if rustfmt is unavailable on the latest nightly #104

Merged
merged 1 commit into from
Sep 6, 2019
Merged
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
8 changes: 7 additions & 1 deletion ci/rustfmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@ jobs:
parameters:
rust_version: nightly
- script: |
rustup component add rustfmt
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
displayName: Install rustfmt
- script: |
cargo fmt --all -- --check --unstable-features
Expand Down