From 093e58de2ffc8243e6ff929f50a2aaa6ef60848b Mon Sep 17 00:00:00 2001 From: Melody Horn Date: Thu, 1 Apr 2021 17:44:50 -0600 Subject: slightly fancier errors --- src/makefile/command_line.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/makefile/command_line.rs') diff --git a/src/makefile/command_line.rs b/src/makefile/command_line.rs index aaf964a..8756bc9 100644 --- a/src/makefile/command_line.rs +++ b/src/makefile/command_line.rs @@ -3,6 +3,8 @@ use std::fmt; use std::io; use std::process::{Command, ExitStatus}; +use eyre::bail; + use crate::makefile::target::Target; use crate::makefile::token::{Token, TokenString}; use crate::makefile::Makefile; @@ -69,7 +71,7 @@ impl CommandLine { } } - pub fn execute(&self, file: &Makefile, target: &Target) -> anyhow::Result<()> { + pub fn execute(&self, file: &Makefile, target: &Target) -> eyre::Result<()> { let ignore_error = self.ignore_errors || file.args.ignore_errors || file.special_target_has_prereq(".IGNORE", &target.name); @@ -94,7 +96,7 @@ impl CommandLine { if errored { // apparently there was an error. do we care? if !ignore_error { - anyhow::bail!("error from command execution!"); + bail!("error from command execution!"); } } -- cgit v1.2.3