From e6aa05077271ec45854b8b16e59addcbcf7367c5 Mon Sep 17 00:00:00 2001 From: Sergey Pepyakin Date: Tue, 6 Feb 2018 19:01:16 +0300 Subject: [PATCH] Run nightly only if NIGHTLY_TOOLCHAIN is defined --- doc.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc.sh b/doc.sh index 4c20b7a..5148060 100755 --- a/doc.sh +++ b/doc.sh @@ -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.