Skip to content

Commit 240c161

Browse files
Rollup merge of #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
2 parents c535041 + 670631d commit 240c161

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/tools/rustdoc-themes/main.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use std::env::args;
2-
use std::fs::File;
2+
use std::fs::{create_dir_all, File};
33
use std::io::{BufRead, BufReader, BufWriter, Write};
44
use std::path::Path;
55
use std::process::{exit, Command};
@@ -14,6 +14,7 @@ fn get_themes<P: AsRef<Path>>(style_path: P) -> Vec<String> {
1414
std::time::SystemTime::UNIX_EPOCH.elapsed().expect("time is after UNIX epoch").as_millis();
1515

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

0 commit comments

Comments
 (0)