Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cli): example should imply copy #4923

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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