From 9d4eb663e63135397b02ab4cf7b3ed0e3ab8dc60 Mon Sep 17 00:00:00 2001 From: Palina Date: Fri, 22 Nov 2024 09:42:53 +0400 Subject: [PATCH] Propagate `forge build` error message to `kontrol build` output (#891) * Propagate `forge build` error message to `kontrol build` output * Remove redundant `"Error"` --- src/kontrol/foundry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kontrol/foundry.py b/src/kontrol/foundry.py index 12ecd5b12..73c89ca7e 100644 --- a/src/kontrol/foundry.py +++ b/src/kontrol/foundry.py @@ -421,7 +421,7 @@ def build(self, metadata: bool) -> None: "Error: 'forge' command not found. Please ensure that 'forge' is installed and added to your PATH." ) from err except CalledProcessError as err: - raise RuntimeError("Couldn't forge build!") from err + raise RuntimeError(f"Couldn't forge build! {err.stderr.strip()}") from err @cached_property def all_tests(self) -> list[str]: