Skip to content

Commit

Permalink
Update crates/turborepo-lib/src/commands/generate.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Nicholas Yang <nicholas.yang@vercel.com>
  • Loading branch information
tknickman and NicholasLYang authored May 11, 2023
1 parent 54d0555 commit 7236d19
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions crates/turborepo-lib/src/commands/generate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,12 @@ fn verify_requirements() -> Result<()> {
.stderr(Stdio::null())
.status();

const ERROR_MSG: &str = "Unable to run generate - missing requirements (npx)";
match output {
Ok(result) => {
if result.success() {
return Ok(());
}
return Err(anyhow::anyhow!(ERROR_MSG));
}
Err(_) => {
return Err(anyhow::anyhow!(ERROR_MSG));
Ok(result) if result.success() => Ok(()),
_ => {
Err(anyhow::anyhow!("Unable to run generate - missing requirements (npx)"))
}
}
}

fn call_turbo_gen(command: &str, tag: &String, raw_args: &str) -> Result<i32> {
let mut npx = Command::new("npx");
Expand Down

0 comments on commit 7236d19

Please sign in to comment.