Skip to content

Commit 670631d

Browse files
committed
Ensure build/tmp exists in rustdoc_themes::get_themes
1 parent 4b91288 commit 670631d

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)