Skip to content

Commit

Permalink
bootstrap: do not purge docs on CI environment
Browse files Browse the repository at this point in the history
Temporary fix for rust-lang#117430

Signed-off-by: onur-ozkan <[email protected]>
  • Loading branch information
onur-ozkan committed Nov 2, 2023
1 parent c5afe0a commit 6198e88
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/bootstrap/src/core/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ pub use crate::Compiler;
// - use std::lazy for `Lazy`
// - use std::cell for `OnceCell`
// Once they get stabilized and reach beta.
use build_helper::ci::CiEnv;
use clap::ValueEnum;
use once_cell::sync::{Lazy, OnceCell};

Expand Down Expand Up @@ -1273,7 +1274,12 @@ impl<'a> Builder<'a> {
self.clear_if_dirty(&out_dir, &backend);
}

if cmd == "doc" || cmd == "rustdoc" {
if cmd == "doc"
|| cmd == "rustdoc"
// FIXME: We shouldn't need to check this.
// ref https://github.com/rust-lang/rust/issues/117430#issuecomment-1788160523
&& !CiEnv::is_ci()
{
let my_out = match mode {
// This is the intended out directory for compiler documentation.
Mode::Rustc | Mode::ToolRustc => self.compiler_doc_out(target),
Expand Down

0 comments on commit 6198e88

Please sign in to comment.