File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed
Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -122,16 +122,18 @@ impl<'a> CargoRunner<'a> {
122122 self . args ,
123123 & self . config . raw . common ,
124124 ) ;
125- let default_build_flags = [ "--all-targets" . to_owned ( ) ] ;
126- for flag in self
127- . config
128- . raw
129- . common
130- . build_flags
131- . as_deref ( )
132- . unwrap_or ( default_build_flags. as_slice ( ) )
133- {
134- command. arg ( flag) ;
125+ if self . args . command . is_none ( ) {
126+ let default_build_flags = [ "--all-targets" . to_owned ( ) ] ;
127+ for flag in self
128+ . config
129+ . raw
130+ . common
131+ . build_flags
132+ . as_deref ( )
133+ . unwrap_or ( default_build_flags. as_slice ( ) )
134+ {
135+ command. arg ( flag) ;
136+ }
135137 }
136138 let rustc_path = rustup_rustc_path ( ) . unwrap_or_else ( |_| PathBuf :: from ( "rustc" ) ) ;
137139 if let Some ( target) = & self . args . target {
You can’t perform that action at this time.
0 commit comments