Skip to content

Commit a752c3a

Browse files
committed
2 parents e13b7c6 + cb92215 commit a752c3a

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

src-tauri/src/shared/git_ui_core/diff.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ use tokio::sync::Mutex;
1212
use crate::git_utils::{
1313
diff_patch_to_string, diff_stats_for_path, image_mime_type, resolve_git_root,
1414
};
15+
use crate::shared::process_core::std_command;
1516
use crate::types::{AppSettings, GitCommitDiff, GitFileDiff, GitFileStatus, WorkspaceEntry};
1617
use crate::utils::{git_env_path, normalize_git_path, resolve_git_binary};
1718

@@ -147,7 +148,7 @@ pub(super) fn collect_ignored_paths_with_git(
147148

148149
let repo_root = repo.workdir()?;
149150
let git_bin = resolve_git_binary().ok()?;
150-
let mut child = std::process::Command::new(git_bin)
151+
let mut child = std_command(git_bin)
151152
.arg("check-ignore")
152153
.arg("--stdin")
153154
.arg("-z")

src-tauri/src/shared/process_core.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ pub(crate) fn tokio_command(program: impl AsRef<OsStr>) -> Command {
2525
command
2626
}
2727

28+
pub(crate) fn std_command(program: impl AsRef<OsStr>) -> std::process::Command {
29+
let mut command = std::process::Command::new(program);
30+
hide_console_on_windows(&mut command);
31+
command
32+
}
33+
2834
pub(crate) async fn kill_child_process_tree(child: &mut Child) {
2935
#[cfg(windows)]
3036
{

0 commit comments

Comments
 (0)