Skip to content

Commit

Permalink
Fix bug in cli parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
NicholasLYang committed Apr 17, 2024
1 parent 13ba34f commit aac815a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions crates/turborepo-lib/src/cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1029,9 +1029,10 @@ pub async fn run(
let mut command = if let Some(command) = mem::take(&mut cli_args.command) {
command
} else {
let run_args = mem::take(&mut cli_args.run_args)
.ok_or_else(|| Error::NoCommand(Backtrace::capture()))?;
let execution_args = mem::take(&mut cli_args.execution_args)
let run_args = cli_args.run_args.take().unwrap_or_default();
let execution_args = cli_args
.execution_args
.take()
.ok_or_else(|| Error::NoCommand(Backtrace::capture()))?;
if execution_args.tasks.is_empty() {
let mut cmd = <Args as CommandFactory>::command();
Expand Down

0 comments on commit aac815a

Please sign in to comment.