aboutsummaryrefslogtreecommitdiff
path: root/src/makefile/command_line.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/makefile/command_line.rs')
-rw-r--r--src/makefile/command_line.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/makefile/command_line.rs b/src/makefile/command_line.rs
index 20b0d25..fd1ef97 100644
--- a/src/makefile/command_line.rs
+++ b/src/makefile/command_line.rs
@@ -69,7 +69,7 @@ impl CommandLine {
}
}
- pub(crate) fn execute(&self, file: &Makefile, target: &Target) {
+ pub(crate) fn execute(&self, file: &Makefile, target: &Target) -> anyhow::Result<()> {
let ignore_error = self.ignore_errors
|| file.args.ignore_errors
|| file.special_target_has_prereq(".IGNORE", &target.name);
@@ -77,7 +77,7 @@ impl CommandLine {
|| file.args.silent
|| file.special_target_has_prereq(".SILENT", &target.name);
- let execution_line = file.expand_macros(&self.execution_line, Some(target));
+ let execution_line = file.expand_macros(&self.execution_line, Some(target))?;
if !silent {
println!("{}", execution_line);
@@ -86,7 +86,7 @@ impl CommandLine {
let should_execute =
self.always_execute || !(file.args.dry_run || file.args.question || file.args.touch);
if !should_execute {
- return;
+ return Ok(());
}
let return_value = execute_command_line(&execution_line, ignore_error);
@@ -98,6 +98,8 @@ impl CommandLine {
panic!("error from command execution!");
}
}
+
+ Ok(())
}
}