diff --git a/loco-gen/src/model.rs b/loco-gen/src/model.rs index 7d04494a..0e1a7404 100644 --- a/loco-gen/src/model.rs +++ b/loco-gen/src/model.rs @@ -120,6 +120,7 @@ mod tests { "async", "--assets", "serverside", + "-a", ]) .status() .expect("cannot run command"); diff --git a/loco-new/src/wizard.rs b/loco-new/src/wizard.rs index 7aecc5c7..d7dd912a 100644 --- a/loco-new/src/wizard.rs +++ b/loco-new/src/wizard.rs @@ -294,6 +294,15 @@ where /// # Errors /// when could not show user selection or user chose not continue pub fn start(args: &ArgsPlaceholder) -> crate::Result { + // user provided everything via flags so no need to prompt, just return + if args.db.is_some() && args.bg.is_some() && args.assets.is_some() { + return Ok(Selections { + db: args.db.clone().unwrap(), + background: args.bg.clone().unwrap(), + asset: args.assets.clone().unwrap(), + }); + } + let template = select_option( "❯ What would you like to build?", &Template::iter().collect::>(),