Skip to content

Commit

Permalink
Unrolled build for rust-lang#115991
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#115991 - ferrocene:rustdoc-themes, r=pietroalbini

Ensure `build/tmp` exists in `rustdoc_themes::get_themes`

This causes failures in ferrocene's CI as `build/tmp` might not exist at this point, causing the following expect to fail here https://github.com/rust-lang/rust/blob/4b91288484569dd59c9a996ae45e08ae9527abc1/src/tools/rustdoc-themes/main.rs#L24
  • Loading branch information
rust-timer authored Sep 20, 2023
2 parents e3811a7 + 670631d commit 7646d5d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/tools/rustdoc-themes/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use std::env::args;
use std::fs::File;
use std::fs::{create_dir_all, File};
use std::io::{BufRead, BufReader, BufWriter, Write};
use std::path::Path;
use std::process::{exit, Command};
Expand All @@ -14,6 +14,7 @@ fn get_themes<P: AsRef<Path>>(style_path: P) -> Vec<String> {
std::time::SystemTime::UNIX_EPOCH.elapsed().expect("time is after UNIX epoch").as_millis();

let mut in_theme = None;
create_dir_all("build/tmp").expect("failed to create temporary test directory");
for line in BufReader::new(File::open(style_path).expect("read rustdoc.css failed")).lines() {
let line = line.expect("read line from rustdoc.css failed");
let line = line.trim();
Expand Down

0 comments on commit 7646d5d

Please sign in to comment.