diff options
author | Melody Horn <melody@boringcactus.com> | 2021-04-02 20:12:25 -0600 |
---|---|---|
committer | Melody Horn <melody@boringcactus.com> | 2021-04-02 20:12:25 -0600 |
commit | 9e714b326f0d30b4154c3120a92d6807beaadfca (patch) | |
tree | 9055fee0bb1fc73b510a9d34421d98fce65c1c34 /src | |
parent | 1b3e677507c17388bc2ae85ad5a6c03a9dff139b (diff) | |
download | makers-9e714b326f0d30b4154c3120a92d6807beaadfca.tar.gz makers-9e714b326f0d30b4154c3120a92d6807beaadfca.zip |
add context for dependency resolution
Diffstat (limited to 'src')
-rw-r--r-- | src/makefile/target.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/makefile/target.rs b/src/makefile/target.rs index 615c9e9..7c0d67c 100644 --- a/src/makefile/target.rs +++ b/src/makefile/target.rs @@ -3,7 +3,7 @@ use std::fmt; use std::fs::metadata; use std::time::SystemTime; -use eyre::Result; +use eyre::{Result, WrapErr}; use crate::makefile::command_line::CommandLine; @@ -54,7 +54,8 @@ impl Target { pub fn update(&self, file: &Makefile) -> Result<()> { for prereq in &self.prerequisites { - file.update_target(prereq)?; + file.update_target(prereq) + .wrap_err_with(|| format!("as a dependency for target {}", self.name))?; } if !self.is_up_to_date(file) { self.execute_commands(file)?; |