Commit bc75d84 1 parent f36f37a commit bc75d84 Copy full SHA for bc75d84
File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -5,20 +5,24 @@ use std::{
5
5
6
6
use std:: os:: windows:: process:: CommandExt ;
7
7
8
+ const CREATE_NO_WINDOW : u32 = 0x08000000 ;
9
+
8
10
pub fn commands < T : AsRef < OsStr > > ( path : T ) -> Vec < Command > {
9
11
let mut cmd = Command :: new ( "cmd" ) ;
10
12
cmd. arg ( "/c" )
11
13
. arg ( "start" )
12
14
. raw_arg ( "\" \" " )
13
- . raw_arg ( wrap_in_quotes ( path) ) ;
15
+ . raw_arg ( wrap_in_quotes ( path) )
16
+ . creation_flags ( CREATE_NO_WINDOW ) ;
14
17
vec ! [ cmd]
15
18
}
16
19
17
20
pub fn with_command < T : AsRef < OsStr > > ( path : T , app : impl Into < String > ) -> Command {
18
21
let mut cmd = Command :: new ( "cmd" ) ;
19
22
cmd. arg ( "/c" )
20
23
. raw_arg ( app. into ( ) )
21
- . raw_arg ( wrap_in_quotes ( path) ) ;
24
+ . raw_arg ( wrap_in_quotes ( path) )
25
+ . creation_flags ( CREATE_NO_WINDOW ) ;
22
26
cmd
23
27
}
24
28
You can’t perform that action at this time.
0 commit comments