From 7008f570b0f00861893a5ef42e8d0220ca0ee1b4 Mon Sep 17 00:00:00 2001 From: Dmitry Savintsev Date: Thu, 26 Jan 2023 12:06:27 +0100 Subject: [PATCH] fail with descriptive message Co-authored-by: Michal Rostecki --- xtask/src/run.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xtask/src/run.rs b/xtask/src/run.rs index 12b4d38..109515e 100644 --- a/xtask/src/run.rs +++ b/xtask/src/run.rs @@ -63,6 +63,8 @@ pub fn run(opts: Options) -> Result<(), anyhow::Error> { .status() .expect("failed to run the command"); - assert!(status.success()); + if !status.success() { + anyhow::bail!("Failed to run `{}`", args.join(" ")); + } Ok(()) }