File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 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> {
203203}
204204
205205trait 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+
206216 fn with_no_window ( & mut self ) -> & mut Self ;
207217}
208218
@@ -216,7 +226,7 @@ impl CommandExt for Command {
216226 #[ cfg( windows) ]
217227 {
218228 use std:: os:: windows:: process:: CommandExt ;
219- self . creation_flags ( 0x0800_0000 ) ;
229+ self . creation_flags ( Self :: CREATE_NO_WINDOW ) ;
220230 }
221231
222232 self
You can’t perform that action at this time.
0 commit comments