Merge branch 'patch10' into 'master'

fix(cook/fetch): check if directory does not exist

See merge request redox-os/cookbook!445
This commit is contained in:
Jeremy Soller 2025-02-02 15:28:51 +00:00
commit 914b78a284

View File

@ -232,7 +232,7 @@ fn fetch(recipe_dir: &Path, source: &Option<SourceRecipe>) -> Result<PathBuf, St
}
}
Some(SourceRecipe::Path { path }) => {
if modified_dir(Path::new(path))? > modified_dir(&source_dir)? {
if !source_dir.is_dir() || modified_dir(Path::new(path))? > modified_dir(&source_dir)? {
eprintln!("[DEBUG]: {} is newer than {}", path, source_dir.display());
copy_dir_all(path, &source_dir).map_err(|e| {
format!(