File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -237,6 +237,13 @@ mod prepare {
237
237
} else {
238
238
Command :: new ( prep. command )
239
239
} ;
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
+ }
240
247
cmd. stdin ( prep. stdin )
241
248
. stdout ( prep. stdout )
242
249
. stderr ( prep. stderr )
@@ -401,6 +408,8 @@ pub mod shebang {
401
408
/// - `stdout` is captured for consumption by the caller
402
409
/// - `stderr` is inherited to allow the command to provide context to the user
403
410
///
411
+ /// On Windows, terminal Windows will be suppressed automatically.
412
+ ///
404
413
/// ### Warning
405
414
///
406
415
/// When using this method, be sure that the invoked program doesn't rely on the current working dir and/or
You can’t perform that action at this time.
0 commit comments