File tree 1 file changed +11
-1
lines changed
1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -203,6 +203,16 @@ fn find_default_unix_shell() -> Option<PathBuf> {
203
203
}
204
204
205
205
trait CommandExt {
206
+ /// The process is a console application that is being run without a
207
+ /// console window. Therefore, the console handle for the application is
208
+ /// not set.
209
+ ///
210
+ /// This flag is ignored if the application is not a console application,
211
+ /// or if it used with either `CREATE_NEW_CONSOLE` or `DETACHED_PROCESS`.
212
+ ///
213
+ /// See: https://learn.microsoft.com/en-us/windows/win32/procthread/process-creation-flags
214
+ const CREATE_NO_WINDOW : u32 = 0x0800_0000 ;
215
+
206
216
fn with_no_window ( & mut self ) -> & mut Self ;
207
217
}
208
218
@@ -216,7 +226,7 @@ impl CommandExt for Command {
216
226
#[ cfg( windows) ]
217
227
{
218
228
use std:: os:: windows:: process:: CommandExt ;
219
- self . creation_flags ( 0x0800_0000 ) ;
229
+ self . creation_flags ( Self :: CREATE_NO_WINDOW ) ;
220
230
}
221
231
222
232
self
You can’t perform that action at this time.
0 commit comments