Skip to content

Commit

Permalink
feat(cli): generators what -> type + cmd change
Browse files Browse the repository at this point in the history
  • Loading branch information
tknickman committed May 17, 2023
1 parent 717e8c3 commit 46af618
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
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

0 comments on commit 46af618

Please sign in to comment.