Skip to content

Commit

Permalink
Merge pull request wasmCloud#152 from stevelr/fix/format-cmd-error-me…
Browse files Browse the repository at this point in the history
…ssage

Improve error message if format executable was not found
  • Loading branch information
connorsmith256 authored Jul 1, 2023
2 parents f4c9a58 + 218ee48 commit 1cdfd9c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion codegen/src/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ pub(crate) fn run_command(program: &str, args: &[&str]) -> Result<()> {
let mut child = std::process::Command::new(program)
.args(args.iter())
.spawn()
.map_err(|e| Error::Formatter(format!("failed to start: {e}")))?;
.map_err(|e| {
Error::Formatter(format!("failed to start format program \"{program}\": {e}"))
})?;

let code = child
.wait()
Expand Down

0 comments on commit 1cdfd9c

Please sign in to comment.