The -i flag allows a package to be installed without updating. It seems cargo-update is checking only for installed packages to be updated. Since rustfmt is not installed initially in the travis build then it does not need updating and so nothing happens. The -i flag fixes that by telling cargo-update to install the package.

This commit is contained in:
doxterpepper 2017-12-02 17:12:17 -05:00 committed by David Peter
parent 9bd1d12c00
commit e2b8a3cce2

View file

@ -80,14 +80,14 @@ matrix:
# skip the global install step # skip the global install step
install: install:
- which cargo-install-update || cargo install cargo-update - which cargo-install-update || cargo install cargo-update
- cargo install-update rustfmt - cargo install-update -i rustfmt
script: cargo fmt -- --write-mode=diff script: cargo fmt -- --write-mode=diff
- os: linux - os: linux
rust: nightly rust: nightly
# skip the global install step # skip the global install step
install: install:
- which cargo-install-update || cargo install cargo-update - which cargo-install-update || cargo install cargo-update
- cargo install-update rustfmt-nightly - cargo install-update -i rustfmt-nightly
script: cargo fmt -- --write-mode=diff script: cargo fmt -- --write-mode=diff
addons: addons: