git: Fix errors not showing in the toast notification (#26303)
Release Notes: - Resolved an issue where error messages from Git were not being displayed in toast notifications. <img width="1702" alt="Screenshot 2025-03-08 at 1 11 30 AM" src="https://github.com/user-attachments/assets/a46517db-4e64-4c5e-a64e-96e820ca9aec" />
This commit is contained in:
@@ -692,7 +692,9 @@ impl GitRepository for RealGitRepository {
|
||||
PushOptions::Force => "--force-with-lease",
|
||||
}))
|
||||
.arg(remote_name)
|
||||
.arg(format!("{}:{}", branch_name, branch_name));
|
||||
.arg(format!("{}:{}", branch_name, branch_name))
|
||||
.stdout(smol::process::Stdio::piped())
|
||||
.stderr(smol::process::Stdio::piped());
|
||||
let git_process = command.spawn()?;
|
||||
|
||||
run_remote_command(ask_pass, git_process)
|
||||
@@ -714,7 +716,9 @@ impl GitRepository for RealGitRepository {
|
||||
.current_dir(&working_directory)
|
||||
.args(["pull"])
|
||||
.arg(remote_name)
|
||||
.arg(branch_name);
|
||||
.arg(branch_name)
|
||||
.stdout(smol::process::Stdio::piped())
|
||||
.stderr(smol::process::Stdio::piped());
|
||||
let git_process = command.spawn()?;
|
||||
|
||||
run_remote_command(ask_pass, git_process)
|
||||
@@ -729,7 +733,9 @@ impl GitRepository for RealGitRepository {
|
||||
.env("SSH_ASKPASS", ask_pass.script_path())
|
||||
.env("SSH_ASKPASS_REQUIRE", "force")
|
||||
.current_dir(&working_directory)
|
||||
.args(["fetch", "--all"]);
|
||||
.args(["fetch", "--all"])
|
||||
.stdout(smol::process::Stdio::piped())
|
||||
.stderr(smol::process::Stdio::piped());
|
||||
let git_process = command.spawn()?;
|
||||
|
||||
run_remote_command(ask_pass, git_process)
|
||||
|
||||
Reference in New Issue
Block a user