@@ -61,11 +61,6 @@ def run(self):
6161 def run_setup (self ):
6262 self .progress .emit ("--- STARTING SETUP PROCESS ---" )
6363
64- # --- Hide Console Window on Windows ---
65- creation_flags = 0
66- if sys .platform == "win32" :
67- creation_flags = subprocess .CREATE_NO_WINDOW
68-
6964 if not os .path .exists (self .venv_path ):
7065 self .progress .emit (f"Target venv path does not exist: { self .venv_path } " )
7166 self .progress .emit ("Attempting to create new virtual environment..." )
@@ -95,7 +90,7 @@ def run_setup(self):
9590 self .progress .emit (f"DEBUG: Subprocess command to run: { cmd } " )
9691
9792 # No need to set cwd, as we use an absolute path to the executable.
98- result = subprocess .run (cmd , capture_output = True , text = True , encoding = "utf-8" , creationflags = creation_flags )
93+ result = subprocess .run (cmd , capture_output = True , text = True , encoding = "utf-8" , creationflags = subprocess . CREATE_NO_WINDOW )
9994
10095 if result .returncode != 0 :
10196 self .progress .emit (f"ERROR: Subprocess failed with return code { result .returncode } ." )
@@ -143,11 +138,7 @@ def run_verify(self):
143138 self .progress .emit ("Checking installed packages..." )
144139 cmd = [venv_python_exe , "-m" , "pip" , "freeze" ]
145140
146- creation_flags = 0
147- if sys .platform == "win32" :
148- creation_flags = subprocess .CREATE_NO_WINDOW
149-
150- result = subprocess .run (cmd , capture_output = True , text = True , encoding = "utf-8" , creationflags = creation_flags )
141+ result = subprocess .run (cmd , capture_output = True , text = True , encoding = "utf-8" , creationflags = subprocess .CREATE_NO_WINDOW )
151142 if result .returncode != 0 :
152143 self .finished .emit (False , "Verification Failed: Could not list installed packages." )
153144 return
0 commit comments