File tree Expand file tree Collapse file tree
tooling/cli/src/interface Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ " cli.rs " : " patch"
3+ ---
4+
5+ Fix cli passing ` --no-default-features ` to the app instead of the runner (Cargo).
Original file line number Diff line number Diff line change @@ -285,7 +285,20 @@ impl Rust {
285285 mut options : Options ,
286286 on_exit : F ,
287287 ) -> crate :: Result < DevChild > {
288- if !options. args . contains ( & "--no-default-features" . into ( ) ) {
288+ let mut args = Vec :: new ( ) ;
289+ let mut run_args = Vec :: new ( ) ;
290+ let mut reached_run_args = false ;
291+ for arg in options. args . clone ( ) {
292+ if reached_run_args {
293+ run_args. push ( arg) ;
294+ } else if arg == "--" {
295+ reached_run_args = true ;
296+ } else {
297+ args. push ( arg) ;
298+ }
299+ }
300+
301+ if !args. contains ( & "--no-default-features" . into ( ) ) {
289302 let manifest_features = self . app_settings . manifest . features ( ) ;
290303 let enable_features: Vec < String > = manifest_features
291304 . get ( "default" )
@@ -300,7 +313,7 @@ impl Rust {
300313 }
301314 } )
302315 . collect ( ) ;
303- options . args . push ( "--no-default-features" . into ( ) ) ;
316+ args. push ( "--no-default-features" . into ( ) ) ;
304317 if !enable_features. is_empty ( ) {
305318 options
306319 . features
@@ -309,18 +322,6 @@ impl Rust {
309322 }
310323 }
311324
312- let mut args = Vec :: new ( ) ;
313- let mut run_args = Vec :: new ( ) ;
314- let mut reached_run_args = false ;
315- for arg in options. args . clone ( ) {
316- if reached_run_args {
317- run_args. push ( arg) ;
318- } else if arg == "--" {
319- reached_run_args = true ;
320- } else {
321- args. push ( arg) ;
322- }
323- }
324325 options. args = args;
325326
326327 desktop:: run_dev (
You can’t perform that action at this time.
0 commit comments