Skip to content

Commit

Permalink
migrate gen to loco-new
Browse files Browse the repository at this point in the history
  • Loading branch information
jondot committed Nov 14, 2024
1 parent f7f1567 commit dd1b7fd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions loco-gen/src/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ mod tests {
"async",
"--assets",
"serverside",
"-a",
])
.status()
.expect("cannot run command");
Expand Down
9 changes: 9 additions & 0 deletions loco-new/src/wizard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,15 @@ where
/// # Errors
/// when could not show user selection or user chose not continue
pub fn start(args: &ArgsPlaceholder) -> crate::Result<Selections> {
// 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::<Vec<_>>(),
Expand Down

0 comments on commit dd1b7fd

Please sign in to comment.