1
1
mirror of https://github.com/casey/just.git synced 2024-11-22 02:09:44 +03:00
This commit is contained in:
Greg Shuflin 2024-11-01 21:24:32 -07:00
parent 0716e62761
commit aca47c7229

View File

@ -389,16 +389,13 @@ impl<'src, D> Recipe<'src, D> {
})?;
let mut path = tempdir.path().to_path_buf();
let extension = self
.attributes
.get(AttributeDiscriminant::Extension)
.and_then(|attribute| {
if let Attribute::Extension(extension) = attribute {
Some(extension.cooked.as_str())
} else {
None
}
});
let extension = self.attributes.iter().find_map(|attribute| {
if let Attribute::Extension(extension) = attribute {
Some(extension.cooked.as_str())
} else {
None
}
});
path.push(executor.script_filename(self.name(), extension));