-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(prune): add ability to specify scopes via argument instead of fl…
…ag (#6022) ### Description As per @nathanhammond's suggestion, `--scope` should be an arg since it is required. UI change: We now have help text for the `SCOPE` argument, wording isn't great, but it matches the wording used for the overall prune command. Clap will now complain about missing scopes for prune before our error message in `prune.rs` where we check if [`scopes` is empty](https://github.com/vercel/turbo/blob/main/crates/turborepo-lib/src/commands/prune.rs#L234C12-L234C12). All existing usages of `turbo prune` will continue working just a different error message: Old: ``` [1 olszewski@chriss-mbp] /Users/olszewski/code/vercel/turborepo/turborepo-tests/integration $ turbo prune Turbo error: at least one target must be specified ``` New: ``` [0 olszewski@chriss-mbp] /Users/olszewski/code/vercel/turborepo/turborepo-tests/integration $ turbo_dev prune ERROR the following required arguments were not provided: <SCOPE>... Usage: turbo prune <SCOPE>... For more information, try '--help'. ``` ### Testing Instructions Added new unit tests that use the arg variant and a new test to make sure users can't mix the two ways to specify scope. Closes TURBO-1357 Co-authored-by: Chris Olszewski <Chris Olszewski>
- Loading branch information
1 parent
d063cca
commit 64b693f
Showing
1 changed file
with
53 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters