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

chore: extract logic for defaulting to run into helper #10011

Merged
merged 2 commits into from
Feb 21, 2025

Conversation

erikareads
Copy link
Contributor

Description

Refactor to pull the logic for getting a Command from cli_args into a named helper.

The get_command helper further uses a helper that makes it clear that Command::Run is the default if no command is specified when Turborepo is invoked.

There's still some future work to do based on the comment here:

// TODO: remove mutability from this function

to make cli_args to be non-mutable.

@erikareads erikareads requested a review from a team as a code owner February 19, 2025 21:23
@turbo-orchestrator turbo-orchestrator bot added the needs: triage New issues get this label. Remove it after triage label Feb 19, 2025
Copy link

vercel bot commented Feb 19, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
examples-basic-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 19, 2025 9:34pm
examples-designsystem-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 19, 2025 9:34pm
examples-gatsby-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 19, 2025 9:34pm
examples-kitchensink-blog ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 19, 2025 9:34pm
examples-native-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 19, 2025 9:34pm
examples-nonmonorepo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 19, 2025 9:34pm
examples-svelte-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 19, 2025 9:34pm
examples-tailwind-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 19, 2025 9:34pm
examples-vite-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 19, 2025 9:34pm

@erikareads erikareads merged commit 88f2241 into main Feb 21, 2025
39 checks passed
@erikareads erikareads deleted the erikarowland/refactor-command-initialization-logic branch February 21, 2025 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: triage New issues get this label. Remove it after triage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants