Run nightly only if NIGHTLY_TOOLCHAIN is defined

This commit is contained in:
Sergey Pepyakin 2018-02-06 19:01:16 +03:00
parent 367f17989b
commit e6aa050772
1 changed files with 5 additions and 1 deletions

6
doc.sh
View File

@ -4,7 +4,11 @@ set -eux
cd $(dirname $0)
rustup run $NIGHTLY_TOOLCHAIN cargo doc
if [ -s NIGHTLY_TOOLCHAIN ]; then
rustup run $NIGHTLY_TOOLCHAIN cargo doc
else
cargo doc
fi;
# cargo-deadlinks will check any links in docs generated by `cargo doc`.
# This is useful as rustdoc uses raw links which are error prone.