Skip to content

Commit 6198e88

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 c5afe0a commit 6198e88

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/bootstrap/src/core/builder.rs

+7-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,12 @@ impl<'a> Builder<'a> {
12731274
self.clear_if_dirty(&out_dir, &backend);
12741275
}
12751276

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

0 commit comments

Comments
 (0)