Skip to content

Commit

Permalink
fix(cli): example should imply copy (#4923)
Browse files Browse the repository at this point in the history
  • Loading branch information
tknickman committed May 12, 2023
1 parent 10b6d71 commit c1f3e66
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion crates/turborepo-lib/src/commands/generate.rs
Expand Up @@ -40,8 +40,15 @@ pub fn run(command: &GenerateCommand, tag: &String) -> Result<()> {

match command {
GenerateCommand::Add(args) => {
let mut add_args = args.clone();
// example implies copy
if add_args.example.is_some() {
add_args.copy = true;
add_args.empty = false;
}

// convert args to json
let raw_args = serde_json::to_string(args)?;
let raw_args = serde_json::to_string(&add_args)?;
call_turbo_gen("add", tag, &raw_args)?;
}
GenerateCommand::Custom(args) => {
Expand Down

0 comments on commit c1f3e66

Please sign in to comment.