mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-25 11:14:46 +00:00
Fix rust-docs in CI.
This commit is contained in:
parent
f79fe537ba
commit
d1cbba6e91
@ -5,7 +5,7 @@ steps:
|
||||
rustup component remove --toolchain=$TOOLCHAIN rust-docs || echo "already removed"
|
||||
rustup update --no-self-update $TOOLCHAIN
|
||||
if [[ "$TOOLCHAIN" == "nightly"* ]]; then
|
||||
rustup component add --toolchain=$TOOLCHAIN rustc-dev llvm-tools-preview
|
||||
rustup component add --toolchain=$TOOLCHAIN rustc-dev llvm-tools-preview rust-docs
|
||||
fi
|
||||
rustup default $TOOLCHAIN
|
||||
displayName: Install rust
|
||||
|
@ -78,10 +78,12 @@ fn std_docs() {
|
||||
// --extern-html-root-url is unstable
|
||||
return;
|
||||
}
|
||||
if !cargo::util::is_ci() {
|
||||
// For local developers, skip this test if docs aren't installed.
|
||||
let docs = std::path::Path::new(&paths::sysroot()).join("share/doc/rust/html");
|
||||
if !docs.exists() {
|
||||
// For local developers, skip this test if docs aren't installed.
|
||||
let docs = std::path::Path::new(&paths::sysroot()).join("share/doc/rust/html");
|
||||
if !docs.exists() {
|
||||
if cargo::util::is_ci() {
|
||||
panic!("std docs are not installed, check that the rust-docs component is installed");
|
||||
} else {
|
||||
eprintln!(
|
||||
"documentation not found at {}, \
|
||||
skipping test (run `rustdoc component add rust-docs` to install",
|
||||
|
Loading…
x
Reference in New Issue
Block a user