Skip to content

Commit

Permalink
Merge pull request mozilla#207 from mozilla/fix-rustfmt-check
Browse files Browse the repository at this point in the history
Don't run rustfmt check in nightly; fix bug
  • Loading branch information
baumanj authored Mar 10, 2020
2 parents dfb615f + 498eddf commit 5720602
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ env:
- RELEASE=--release

before_script:
- rustup component add rustfmt
# rustfmt may not always be available in nightly
- if [[ "$TRAVIS_RUST_VERSION" != *nightly* ]]; then rustup component add rustfmt; fi

script:
- cargo test --all --verbose $RELEASE
Expand All @@ -26,4 +27,5 @@ script:
# See https://github.com/mozilla/mp4parse-rust/issues/197
- cargo check --all --verbose $RELEASE --tests --all-features
- cargo doc --package mp4parse_capi
- cargo fmt -- --check || echo "Please reformat your code with 'cargo fmt' (version $(cargo fmt -- --version))"
# The `false` after `echo` is necessary to avoid false negatives due to `echo` returning success
- if [[ "$TRAVIS_RUST_VERSION" != *nightly* ]]; then cargo fmt -- --check || (echo "Please reformat your code with 'cargo fmt' (version $(cargo fmt -- --version))"; false); fi

0 comments on commit 5720602

Please sign in to comment.