diff options
author | lesleyrs | 2023-02-10 17:56:56 +0000 |
---|---|---|
committer | GitHub | 2023-02-10 17:56:56 +0000 |
commit | af1157f37c04e158b96f3e2da7c641356b2219dc (patch) | |
tree | 96fc6c4fa1ea01992e766839528561d482e8974f | |
parent | ea3293b4daaa472c363105e3c2c2666a2af82ffc (diff) |
Add exit code to command failed msg (#5898)
-rw-r--r-- | helix-term/src/commands.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index 84daaef4..38a62364 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: {}", |