Skip to content

Commit 30b0e77

Browse files
authored
fix(repo): run turbo via yarn exec for root scripts (#911)
Root build and test scripts invoked `turbo` as a bare binary, which only works when `node_modules/.bin` is on the shell PATH. Cursor's agent sandbox (and similar restricted runners) often use a minimal PATH without that directory, producing "command not found: turbo" even though turbo is installed. Use `yarn exec turbo` so Yarn resolves and runs the workspace dependency without relying on PATH. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk: only adjusts root `package.json` scripts to invoke Turbo via Yarn, affecting how builds/tests are launched but not application/runtime logic. > > **Overview** > Switches root scripts to run Turbo via Yarn resolution instead of relying on the `turbo` binary being on `PATH`. > > Updates `build`, `test:dev`, and `test:dev:quiet` to use `yarn exec turbo run ...`, improving compatibility in environments with restricted `PATH` settings (e.g., CI/sandboxes). > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit c21c392. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent 4fa6147 commit 30b0e77

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"packages/*"
1313
],
1414
"scripts": {
15-
"build": "turbo run build",
15+
"build": "yarn exec turbo run build",
1616
"build:clean": "yarn clean && yarn build",
1717
"build:docs": "yarn workspaces foreach --all --exclude @ocap/monorepo --exclude @ocap/extension --parallel --interlaced --verbose run build:docs",
1818
"changelog:update": "yarn workspaces foreach --all --no-private --parallel --interlaced --verbose run changelog:update",
@@ -29,8 +29,8 @@
2929
"prepack": "./scripts/prepack.sh",
3030
"rebuild:native": "./scripts/rebuild-native.sh",
3131
"test": "vitest run",
32-
"test:dev": "turbo run test:dev",
33-
"test:dev:quiet": "turbo run test:dev:quiet --output-logs=errors-only",
32+
"test:dev": "yarn exec turbo run test:dev",
33+
"test:dev:quiet": "yarn exec turbo run test:dev:quiet --output-logs=errors-only",
3434
"test:e2e": "yarn workspaces foreach --all run test:e2e",
3535
"test:e2e:ci": "yarn workspaces foreach --all run test:e2e:ci",
3636
"test:e2e:local": "yarn workspaces foreach --all run test:e2e:local",

0 commit comments

Comments
 (0)