diff --git a/.travis.yml b/.travis.yml index e7d6531..9ad0c85 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,9 +4,13 @@ rust: - beta - nightly before_script: - - rustup component add rustfmt-preview + - bash -c 'if [[ "$TRAVIS_RUST_VERSION" == "nightly*" ]]; then + rustup component add rustfmt-preview + fi' script: - - cargo fmt --all -- --check + - bash -c 'if [[ "$TRAVIS_RUST_VERSION" == "nightly*" ]]; then + cargo fmt --all -- --check + fi' - cargo build - cargo test matrix: