Skip to content

Commit

Permalink
fix: prevent the popup of terminal Windows on any command invocation.
Browse files Browse the repository at this point in the history
  • Loading branch information
Byron committed Aug 10, 2024
1 parent 087594c commit 0ed66d1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions gix-command/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,13 @@ mod prepare {
} else {
Command::new(prep.command)
};
// We never want to have terminals pop-up on Windows if this runs from a GUI application.
#[cfg(windows)]
{
use std::os::windows::process::CommandExt;
const CREATE_NO_WINDOW: u32 = 0x08000000;
cmd.creation_flags(CREATE_NO_WINDOW);
}
cmd.stdin(prep.stdin)
.stdout(prep.stdout)
.stderr(prep.stderr)
Expand Down

0 comments on commit 0ed66d1

Please sign in to comment.