File tree 2 files changed +9
-1
lines changed
2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -203,13 +203,17 @@ def launch(self, wait : bool = False):
203
203
self .outputs = []
204
204
commands = self .get_final_commands ()
205
205
self .state = ExecutionState .RUNNING
206
+ creationflags = 0
207
+ if platform .system () == 'Windows' :
208
+ creationflags = subprocess .CREATE_NO_WINDOW
206
209
try :
207
210
self .proc = subprocess .Popen (
208
211
commands ,
209
212
stdout = subprocess .PIPE ,
210
213
stderr = subprocess .STDOUT ,
211
214
env = self .composed_envs ,
212
- universal_newlines = False
215
+ universal_newlines = False ,
216
+ creationflags = creationflags
213
217
)
214
218
except Exception as e :
215
219
self .state = ExecutionState .FAILED_LAUNCH
Original file line number Diff line number Diff line change @@ -98,6 +98,7 @@ def setData(self, execinfo : ExecutionInfo):
98
98
for key , value in execinfo .envs .items ():
99
99
self .appendPlainText (f"{ key } ={ value } \n " )
100
100
self .appendPlainText (' ' .join (self .exec .get_final_commands ()) + '\n ' )
101
+ self .appendPlainText ('=' * 20 + '\n ' )
101
102
self .exec .outputAvailable .connect (self .handleOutput )
102
103
103
104
for out in execinfo .specified_outputs :
@@ -135,6 +136,9 @@ def appendPlainText(self, text : str):
135
136
136
137
@Slot ()
137
138
def handle_process_finished (self ):
139
+ if self .exec is None :
140
+ raise RuntimeError ("ExecuteWidget handle_process_finished() called before setData()" )
141
+ self .appendPlainText ('=' * 20 + '\n ' )
138
142
if result := self .exec .result :
139
143
exitcode = result .returncode
140
144
if exitcode == 0 :
You can’t perform that action at this time.
0 commit comments