diff --git a/docs/pages/repo/docs/core-concepts/monorepos/filtering.mdx b/docs/pages/repo/docs/core-concepts/monorepos/filtering.mdx index d154c0ece79b8..f1d727383afa7 100644 --- a/docs/pages/repo/docs/core-concepts/monorepos/filtering.mdx +++ b/docs/pages/repo/docs/core-concepts/monorepos/filtering.mdx @@ -8,7 +8,7 @@ import HeartIcon from "@heroicons/react/solid/HeartIcon"; # Filtering Workspaces -A monorepo can contain hundreds, or thousands, of workspaces. By default, running `turbo run test` will execute the `test` task in **all available workspaces**. +A monorepo can contain hundreds, or thousands, of workspaces. By default, running `turbo run test` from the root of the repository will execute the `test` task in **all available workspaces**. ![Without using a filter, test will be run across all packages](/images/docs/no-filter.png) @@ -191,6 +191,14 @@ turbo run build --filter=!@foo/bar turbo run build --filter=./apps/* --filter=!admin ``` +### Via global `turbo` + +If you are using a globally installed version of `turbo`, running from within a workspace automatically +filters to that workspace's directory. That means running `turbo run test --filter={./packages/shared}` from the root of the repository is equivalent to +running `cd packages/shared && turbo run test`. + +Running with an explicitly named workspace will always work from anywhere in the repository: `turbo run test --filter=shared`. +