Skip to content

Commit

Permalink
Don't exit if infallible line catches signal
Browse files Browse the repository at this point in the history
  • Loading branch information
casey committed Dec 23, 2024
1 parent aed1e4d commit 5f17237
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/recipe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -310,11 +310,13 @@ impl<'src, D> Recipe<'src, D> {
});
}
} else {
return Err(error_from_signal(
self.name(),
Some(line_number),
exit_status,
));
if !infallible_line {
return Err(error_from_signal(
self.name(),
Some(line_number),
exit_status,
));
}
}
}
Err(io_error) => {
Expand All @@ -325,8 +327,10 @@ impl<'src, D> Recipe<'src, D> {
}
};

if let Some(signal) = caught {
return Err(Error::Interrupted { signal });
if !infallible_line {
if let Some(signal) = caught {
return Err(Error::Interrupted { signal });
}
}
}
}
Expand Down

0 comments on commit 5f17237

Please sign in to comment.