diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2023-09-20 17:33:18 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-20 17:33:18 +0200 |
| commit | 240c161bc8e5a132a5f253bbabe160a697cf5b37 (patch) | |
| tree | 2aafe22d078d5ed5b447b09121aff048e23c03d7 | |
| parent | c535041995f9313be4511f2e65d8fdd676f97416 (diff) | |
| parent | 670631dd2606e7cb7cc488a2f7a7331e9dfd39af (diff) | |
| download | rust-240c161bc8e5a132a5f253bbabe160a697cf5b37.tar.gz rust-240c161bc8e5a132a5f253bbabe160a697cf5b37.zip | |
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
| -rw-r--r-- | src/tools/rustdoc-themes/main.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tools/rustdoc-themes/main.rs b/src/tools/rustdoc-themes/main.rs index cc13df1f5ba..1eba83a8057 100644 --- a/src/tools/rustdoc-themes/main.rs +++ b/src/tools/rustdoc-themes/main.rs @@ -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}; @@ -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(); |
