about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-11-02 19:53:41 +0000
committerbors <bors@rust-lang.org>2023-11-02 19:53:41 +0000
commite8418e092a643ef87019192af7ed6bbd23cc4a63 (patch)
treee5537f6845ca8441f6f1d913f09aefe226ff5268
parentb20f40dba9feabf4b446d9b09d15996f0c046eff (diff)
parent6198e881d363730900b7b0d4fa8311b3844421a7 (diff)
downloadrust-e8418e092a643ef87019192af7ed6bbd23cc4a63.tar.gz
rust-e8418e092a643ef87019192af7ed6bbd23cc4a63.zip
Auto merge of #117471 - onur-ozkan:tmp-fix, r=clubby789
bootstrap: do not purge docs on CI environment

This is a temporary fix for #117430, for more information please read https://github.com/rust-lang/rust/issues/117430#issuecomment-1788160523.

Fixes #117430
-rw-r--r--src/bootstrap/src/core/builder.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/bootstrap/src/core/builder.rs b/src/bootstrap/src/core/builder.rs
index 90e09d12a9d..2903bcfa1ec 100644
--- a/src/bootstrap/src/core/builder.rs
+++ b/src/bootstrap/src/core/builder.rs
@@ -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};
 
@@ -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),