From b3c740a090ffd3ae1bbcddf8899ca670f5639acd Mon Sep 17 00:00:00 2001 From: lesleyrs <19632758+lesleyrs@users.noreply.github.com> Date: Fri, 10 Feb 2023 02:07:41 +0100 Subject: [PATCH] add exit code to command failed msg --- helix-term/src/commands.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index 84daaef4e40d..38a6236427a0 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -5043,7 +5043,10 @@ async fn shell_impl_async( log::error!("Shell error: {}", err); bail!("Shell error: {}", err); } - bail!("Shell command failed"); + match output.status.code() { + Some(exit_code) => bail!("Shell command failed: status {}", exit_code), + None => bail!("Shell command failed"), + } } else if !output.stderr.is_empty() { log::debug!( "Command printed to stderr: {}",