Skip to content

Commit 0ed66d1

Browse files
committed
fix: prevent the popup of terminal Windows on any command invocation.
1 parent 087594c commit 0ed66d1

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

gix-command/src/lib.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,13 @@ mod prepare {
237237
} else {
238238
Command::new(prep.command)
239239
};
240+
// We never want to have terminals pop-up on Windows if this runs from a GUI application.
241+
#[cfg(windows)]
242+
{
243+
use std::os::windows::process::CommandExt;
244+
const CREATE_NO_WINDOW: u32 = 0x08000000;
245+
cmd.creation_flags(CREATE_NO_WINDOW);
246+
}
240247
cmd.stdin(prep.stdin)
241248
.stdout(prep.stdout)
242249
.stderr(prep.stderr)

0 commit comments

Comments
 (0)