parent
a6cddba9d4
commit
09705129d0
@ -1,3 +1,4 @@
|
|||||||
|
use std::path::Path;
|
||||||
use crate::native::cache::expand_outputs::get_files_for_outputs;
|
use crate::native::cache::expand_outputs::get_files_for_outputs;
|
||||||
use crate::native::glob::build_glob_set;
|
use crate::native::glob::build_glob_set;
|
||||||
use crate::native::hasher::{hash_array, hash_file};
|
use crate::native::hasher::{hash_array, hash_file};
|
||||||
@ -13,7 +14,7 @@ pub fn hash_task_output(workspace_root: &str, glob: &str, outputs: &[String]) ->
|
|||||||
let hashes = output_files
|
let hashes = output_files
|
||||||
.into_par_iter()
|
.into_par_iter()
|
||||||
.filter(|file| glob.is_match(file))
|
.filter(|file| glob.is_match(file))
|
||||||
.filter_map(hash_file)
|
.filter_map(|file| hash_file(Path::new(workspace_root).join(file).to_str().expect("path contains invalid utf-8").to_owned()))
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
Ok(hash_array(hashes))
|
Ok(hash_array(hashes))
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user