这是indexloc提供的服务,不要输入任何密码
Skip to content

feat: specific error message for potential debugging flags #10513

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

Merged
merged 7 commits into from
May 30, 2025
Merged

Conversation

anthonyshew
Copy link
Contributor

@anthonyshew anthonyshew commented May 27, 2025

Description

When a user tries to use --debug or --verbose as flags, we can make a pretty strong bet that they're trying to get some debug logging from us. In this case, we can supply better direction to the developer.

Testing Instructions

Before:

▲ 👟 turbo on shew/8d2a6
  dt anything --debug
  × The --debug flag is not supported. Please use --verbosity instead.
  │  if you are trying to pass `--debug` as a value, use `-- --debug`.

AFTER:

▲ 👟 turbo on shew/8d2a6
  turbo anything --debug
 ERROR  unexpected argument '--debug' found

  tip: to pass '--debug' as a value, use '-- --debug'

Usage: turbo <--cache-dir <CACHE_DIR>|--concurrency <CONCURRENCY>|--continue[=<CONTINUE>]|--single-package|--framework-inference [<BOOL>]|--global-deps <GLOBAL_DEPS>|--env-mode [<ENV_MODE>]|--filter <FILTER>|--affected|--output-logs <OUTPUT_LOGS>|--log-order <LOG_ORDER>|--only|--pkg-inference-root <PKG_INFERENCE_ROOT>|--log-prefix <LOG_PREFIX>|TASKS|PASS_THROUGH_ARGS>

For more information, try '--help'.

@anthonyshew anthonyshew requested a review from a team as a code owner May 27, 2025 02:25
Copy link

vercel bot commented May 27, 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 May 27, 2025 0:38am
examples-designsystem-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 27, 2025 0:38am
examples-gatsby-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 27, 2025 0:38am
examples-kitchensink-blog ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 27, 2025 0:38am
examples-native-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 27, 2025 0:38am
examples-nonmonorepo ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 27, 2025 0:38am
examples-svelte-web ❌ Failed (Inspect) May 27, 2025 0:38am
examples-tailwind-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 27, 2025 0:38am
examples-vite-web 🔄 Building (Inspect) Visit Preview 💬 Add feedback May 27, 2025 0:38am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
turbo-site ⬜️ Skipped (Inspect) May 27, 2025 0:38am

Comment on lines 280 to 281
/// Verbosity level. Useful when debugging Turborepo or creating logs for
/// issue reports.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for making our --help text every so slightly more explanatory.

Copy link
Member

@chris-olszewski chris-olszewski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome change.

@anthonyshew anthonyshew merged commit 0e98f06 into main May 30, 2025
40 of 41 checks passed
@anthonyshew anthonyshew deleted the shew/8d2a6 branch May 30, 2025 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants