From a0560e3496965fbb5d464e0312c603f2d7133b43 Mon Sep 17 00:00:00 2001 From: David Ross Date: Sun, 26 Feb 2017 11:34:32 -0800 Subject: [PATCH] Update travis section of README This fixes the example travis config to not ignore install errors for rustfmt, while still not trying to overwrite a previous install. In addition, this rewrites the script: section to include multiple commands in a way that travis can more accurately indicate which failed and which succeeded. --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 5afe4953b09..145f9bac3d8 100644 --- a/README.md +++ b/README.md @@ -124,13 +124,13 @@ A minimal Travis setup could look like this: ```yaml language: rust cache: cargo -before_script: (cargo install rustfmt || true) +before_script: +- export PATH="$PATH:$HOME/.cargo/bin" +- which rustfmt || cargo install rustfmt script: -- | - export PATH=$PATH:~/.cargo/bin && - cargo fmt -- --write-mode=diff && - cargo build && - cargo test +- cargo fmt -- --write-mode=diff +- cargo build +- cargo test ``` Note that using `cache: cargo` is optional but highly recommended to speed up the installation.