Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: make turbo command regex stricter (#4325)
### Description With #4223, we started checking and throwing on commands that look like they invoke turbo. The regex is fairly permissive and would match any command that contained a path that ended in `turbo` e.g. `rm ~/.turbo` would get marked as invoking turbo. This PR restricts the regex so it only matches commands that contain `turbo` surrounded by whitespace. This means that we now won't throw if the user directly invokes turbo via a path e.g. `./node_modules/turbo/bin/turbo`. I think this is the correct tradeoff as it's much more likely a user will invoke turbo via either `turbo foo` or `pnpm turbo foo`. Another possibility would be to attempt parse the scripts and do more exact analysis, but to do this and correctly handle Windows would be *fun*. ### Testing Instructions See new unit tests
- Loading branch information