From a723dc8852f761b65b2f4cd25e958bf656278074 Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Fri, 17 Jul 2026 16:03:47 +0300 Subject: fix(windows): prevent remaining subprocess console flashes refs #1468 --- src/worktree.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/worktree.rs') diff --git a/src/worktree.rs b/src/worktree.rs index 33b03d56..0bb091d7 100644 --- a/src/worktree.rs +++ b/src/worktree.rs @@ -199,7 +199,7 @@ pub(crate) fn worktree_dirty_remove_message(path: &Path) -> String { #[cfg(any(windows, test))] pub(crate) fn checkout_has_dirty_files(path: &Path) -> Result { let path_arg = path.display().to_string(); - let output = std::process::Command::new("git") + let output = crate::noninteractive_process::command("git") .args([ "-C", &path_arg, @@ -265,7 +265,7 @@ pub(crate) fn build_worktree_add_existing_branch_command( } pub(crate) fn local_branch_exists(repo_root: &Path, branch: &str) -> Result { - let output = std::process::Command::new("git") + let output = crate::noninteractive_process::command("git") .arg("-C") .arg(repo_root) .args(["show-ref", "--verify", "--quiet"]) @@ -306,7 +306,7 @@ pub(crate) fn run_worktree_add_command( } pub(crate) fn run_worktree_command(command: &WorktreeCommand) -> Result<(), String> { - let output = std::process::Command::new(&command.program) + let output = crate::noninteractive_process::command(&command.program) .args(&command.args) .output() .map_err(|err| err.to_string())?; @@ -375,7 +375,7 @@ fn leftover_worktree_checkout_matches_repo(repo_root: &Path, path: &Path) -> boo } fn git_common_worktrees_dir(repo_root: &Path) -> Option { - let output = std::process::Command::new("git") + let output = crate::noninteractive_process::command("git") .arg("-C") .arg(repo_root) .args(["rev-parse", "--git-common-dir"]) @@ -471,7 +471,7 @@ pub(crate) fn parse_worktree_list_porcelain(output: &str) -> Vec Result, String> { - let output = std::process::Command::new("git") + let output = crate::noninteractive_process::command("git") .arg("-C") .arg(repo_root) .args(["worktree", "list", "--porcelain"]) -- cgit v1.2.3