We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ec46ff7 commit f3a4266Copy full SHA for f3a4266
compiler-cli/src/dependencies.rs
@@ -788,7 +788,17 @@ fn provide_local_package(
788
fn execute_command(command: &mut Command) -> Result<std::process::Output> {
789
let result = command.output();
790
match result {
791
- Ok(output) => Ok(output),
+ Ok(output) if output.status.success() => Ok(output),
792
+ Ok(output) => {
793
+ let reason = match String::from_utf8(output.stderr) {
794
+ Ok(stderr) => ShellCommandFailureReason::ShellCommandError(stderr),
795
+ Err(_) => ShellCommandFailureReason::Unknown,
796
+ };
797
+ Err(Error::ShellCommand {
798
+ program: "git".into(),
799
+ reason,
800
+ })
801
+ }
802
Err(error) => Err(match error.kind() {
803
ErrorKind::NotFound => Error::ShellProgramNotFound {
804
program: "git".into(),
0 commit comments