chore(json-edit): clarify errors
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
Kasper Juul Hermansen 2023-08-04 18:37:32 +02:00
parent 19dd0ff636
commit ff2b59dd02
Signed by: kjuulh
GPG Key ID: 9AA7BC13CE474394

View File

@ -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())?;