Skip to content

Commit

Permalink
Auto merge of rust-lang#117471 - onur-ozkan:tmp-fix, r=clubby789
Browse files Browse the repository at this point in the history
bootstrap: do not purge docs on CI environment

This is a temporary fix for rust-lang#117430, for more information please read rust-lang#117430 (comment).

Fixes rust-lang#117430
  • Loading branch information
bors committed Nov 2, 2023
2 parents b20f40d + 6198e88 commit e8418e0
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 e8418e0

Please sign in to comment.