Skip to content

Commit 7ba6cc6

Browse files
committed
bootstrap: do not purge docs on CI environment
Temporary fix for rust-lang#117430 Signed-off-by: onur-ozkan <work@onurozkan.dev>
1 parent d7d9f15 commit 7ba6cc6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/bootstrap/src/core/builder.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ pub use crate::Compiler;
2828
// - use std::lazy for `Lazy`
2929
// - use std::cell for `OnceCell`
3030
// Once they get stabilized and reach beta.
31+
use build_helper::ci::CiEnv;
3132
use clap::ValueEnum;
3233
use once_cell::sync::{Lazy, OnceCell};
3334

@@ -1273,7 +1274,7 @@ impl<'a> Builder<'a> {
12731274
self.clear_if_dirty(&out_dir, &backend);
12741275
}
12751276

1276-
if cmd == "doc" || cmd == "rustdoc" {
1277+
if cmd == "doc" || cmd == "rustdoc" && !CiEnv::is_ci() {
12771278
let my_out = match mode {
12781279
// This is the intended out directory for compiler documentation.
12791280
Mode::Rustc | Mode::ToolRustc => self.compiler_doc_out(target),

0 commit comments

Comments
 (0)