Create temps_dir before it's needed.
This commit is contained in:
parent
5d1e09f44a
commit
bde794dada
1 changed files with 7 additions and 6 deletions
|
@ -723,6 +723,13 @@ pub fn prepare_outputs(
|
|||
}
|
||||
}
|
||||
|
||||
if let Some(ref dir) = compiler.temps_dir {
|
||||
if fs::create_dir_all(dir).is_err() {
|
||||
sess.err("failed to find or create the directory specified by `--temps-dir`");
|
||||
return Err(ErrorReported);
|
||||
}
|
||||
}
|
||||
|
||||
write_out_deps(sess, boxed_resolver, &outputs, &output_paths);
|
||||
|
||||
let only_dep_info = sess.opts.output_types.contains_key(&OutputType::DepInfo)
|
||||
|
@ -735,12 +742,6 @@ pub fn prepare_outputs(
|
|||
return Err(ErrorReported);
|
||||
}
|
||||
}
|
||||
if let Some(ref dir) = compiler.temps_dir {
|
||||
if fs::create_dir_all(dir).is_err() {
|
||||
sess.err("failed to find or create the directory specified by `--temps-dir`");
|
||||
return Err(ErrorReported);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Ok(outputs)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue