File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 14
14
- RELEASE=--release
15
15
16
16
before_script :
17
- - rustup component add rustfmt
17
+ # rustfmt may not always be available in nightly
18
+ - if [[ "$TRAVIS_RUST_VERSION" != *nightly* ]]; then rustup component add rustfmt; fi
18
19
19
20
script :
20
21
- cargo test --all --verbose $RELEASE
@@ -26,4 +27,5 @@ script:
26
27
# See https://github.com/mozilla/mp4parse-rust/issues/197
27
28
- cargo check --all --verbose $RELEASE --tests --all-features
28
29
- cargo doc --package mp4parse_capi
29
- - cargo fmt -- --check || echo "Please reformat your code with 'cargo fmt' (version $(cargo fmt -- --version))"
30
+ # The `false` after `echo` is necessary to avoid false negatives due to `echo` returning success
31
+ - if [[ "$TRAVIS_RUST_VERSION" != *nightly* ]]; then cargo fmt -- --check || (echo "Please reformat your code with 'cargo fmt' (version $(cargo fmt -- --version))"; false); fi
You can’t perform that action at this time.
0 commit comments