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

feat(cli): generators what -> type + cmd change #4996

Merged
merged 1 commit into from
May 17, 2023
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions crates/turborepo-lib/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,8 @@ pub struct GenerateWorkspaceArgs {
#[clap(short = 'd', long)]
pub destination: Option<String>,
/// The type of workspace to create
#[clap(short = 'w', long)]
pub what: Option<String>,
#[clap(short = 't', long)]
pub r#type: Option<String>,
/// The root of your repository (default: directory with root turbo.json)
#[clap(short = 'r', long)]
pub root: Option<String>,
Expand Down
6 changes: 3 additions & 3 deletions crates/turborepo-lib/src/commands/generate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,16 @@ pub fn run(
Some(command) => {
if let GenerateCommand::Workspace(workspace_args) = command {
let raw_args = serde_json::to_string(&workspace_args)?;
call_turbo_gen("add", tag, &raw_args)?;
call_turbo_gen("workspace", tag, &raw_args)?;
} else {
let raw_args = serde_json::to_string(&args)?;
call_turbo_gen("generate", tag, &raw_args)?;
call_turbo_gen("run", tag, &raw_args)?;
}
}
// if no subcommand was passed, run the generate command as default
None => {
let raw_args = serde_json::to_string(&args)?;
call_turbo_gen("generate", tag, &raw_args)?;
call_turbo_gen("run", tag, &raw_args)?;
}
};

Expand Down