fix(core): resolve dependent task output files path (#22253) (#23179)

This commit is contained in:
Simon Lipp 2024-06-04 21:55:17 +02:00 committed by GitHub
parent a6cddba9d4
commit 09705129d0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,3 +1,4 @@
use std::path::Path;
use crate::native::cache::expand_outputs::get_files_for_outputs;
use crate::native::glob::build_glob_set;
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
.into_par_iter()
.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<_>>();
Ok(hash_array(hashes))
}