From ff2b59dd029ad36a1c0b8d3869c7e6096b4fea33 Mon Sep 17 00:00:00 2001 From: kjuulh Date: Fri, 4 Aug 2023 18:37:32 +0200 Subject: [PATCH] chore(json-edit): clarify errors Signed-off-by: kjuulh --- crates/cuddle-please-release-strategy/src/json_edit.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/cuddle-please-release-strategy/src/json_edit.rs b/crates/cuddle-please-release-strategy/src/json_edit.rs index b3a7d51..07aa492 100644 --- a/crates/cuddle-please-release-strategy/src/json_edit.rs +++ b/crates/cuddle-please-release-strategy/src/json_edit.rs @@ -37,7 +37,9 @@ impl JsonEditOptions { .ok_or(anyhow::anyhow!("path contains non utf-8 chars"))?, ) .output() - .context(anyhow::anyhow!("failed to run jq on file"))?; + .context(anyhow::anyhow!( + "failed to run jq on file, jq may not be installed or query was invalid" + ))?; if !output.status.success() { let err_content = std::str::from_utf8(output.stderr.as_slice())?;