From 1e004e267eea90ef6b83c5bbd2d91c3138831e0c Mon Sep 17 00:00:00 2001 From: Ira Peach <141322834+ira-peach@users.noreply.github.com> Date: Sun, 22 Oct 2023 18:40:10 -0500 Subject: [PATCH] Hide cmd window for mintty when setting cyg_path. (#1267) --- apps/mintty/mintty_win.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/mintty/mintty_win.py b/apps/mintty/mintty_win.py index 56692c311f..338973672e 100644 --- a/apps/mintty/mintty_win.py +++ b/apps/mintty/mintty_win.py @@ -37,8 +37,12 @@ def get_win_path(cyg_path): path = "" try: + si = subprocess.STARTUPINFO() + si.dwFlags |= subprocess.STARTF_USESHOWWINDOW path = ( - subprocess.check_output([setting_cyg_path.get(), "-w", cyg_path]) + subprocess.check_output( + [setting_cyg_path.get(), "-w", cyg_path], startupinfo=si + ) .strip(b"\n") .decode() )