turborepo
4d02c7ff - fix(cli): error on out of place run args (#9445)

Commit
1 year ago
fix(cli): error on out of place run args (#9445) ### Description Currently we have a bug where run args can be specified incorrectly and we'll silently ignore them. - Specified for non-run commands e.g. `turbo --no-daemon watch` - Specified before a subcommand e.g. `turbo --filter=foo run build` `turbo --filter=foo watch build` which will silently ignore any arguments provided before the subcommand. This PR makes these explicit failures instead of silently ignoring them. There is a solution where we attempt to "merge" args provided on either side of the subcommand, but that would require us to switch to `clap`'s builder interface which would make our 80 line top level CLI interface ~1k lines. I do not think this is worth the time to go about that refactor to allow for awkward syntax. ⚠️ This will very possibly break user workflows, but I think this is better than our current ignoring of user provided flags. We could warn here, but I'm afraid that those warnings would go unseen. I suggest reviewing each commit individually as there was some required refactoring to unit test this behavior. ### Testing Instructions Added unit tests
Parents
Loading