refactor: use with_context for process spawning error handling

This commit is contained in:
Andrew Phillips (aider)
2025-05-12 22:04:33 -03:00
parent d827a4d772
commit 1e43a5e855

View File

@@ -51,7 +51,7 @@ impl DigestEngine for DigestEngineProgram {
.stdin(Stdio::piped()) .stdin(Stdio::piped())
.stdout(Stdio::piped()) .stdout(Stdio::piped())
.spawn() .spawn()
.context(anyhow!( .with_context(|| anyhow!(
"Problem spawning child process: {:?} {:?}", "Problem spawning child process: {:?} {:?}",
program, program,
args args