Skip to content

Commit

Permalink
Fix Travis failing on installing Clippy when it's already in cache
Browse files Browse the repository at this point in the history
  • Loading branch information
Cxarli committed Jul 8, 2021
1 parent f7a2bbe commit d7760dd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions clippy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,14 @@ if [ "$RUSTUP_NIGHTLY" = "yes" ]; then
CARGO="rustup run nightly cargo"
fi


if [ "$mode" = "install" ]; then
# Test if clippy is already installed (cache)
$CARGO clippy &> /dev/null
if [ $? -ne 101 ]; then
exit 0
fi

$CARGO install clippy --verbose
exit $?
elif [ "$mode" = "test" ]; then
Expand Down

0 comments on commit d7760dd

Please sign in to comment.