-
Notifications
You must be signed in to change notification settings - Fork 2.2k
fix(config-dir): Resolve relative TURBO_CONFIG_DIR_PATH before validation
#11122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@praggCode is attempting to deploy a commit to the Vercel Team on Vercel. A member of the Team first needs to authorize it. |
TURBO_CONFIG_DIR_PATH before validation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
anthonyshew
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I added some tests for this crate in #11132 to make sure that the code in this PR would introduce failing tests, and they did as expected.
I also had to add handling for empty strings in this PR because of those added tests, which is also an improvement. Thanks for the inpsiration!
This PR contains the following updates: | Package | Change | Age | Confidence | |---|---|---|---| | [turbo](https://turborepo.com) ([source](https://github.com/vercel/turborepo)) | [`2.6.1` -> `2.6.2`](https://renovatebot.com/diffs/npm/turbo/2.6.1/2.6.2) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>vercel/turborepo (turbo)</summary> ### [`v2.6.2`](https://github.com/vercel/turborepo/releases/tag/v2.6.2): Turborepo v2.6.2 [Compare Source](vercel/turborepo@v2.6.1...v2.6.2) <!-- Release notes generated using configuration in .github/release.yml at v2.6.2 --> #### What's Changed ##### Docs - docs: Add mentions to `turborepo-summary` and `turborepo-summary-action` by [@​charpeni](https://github.com/charpeni) in [#​11023](vercel/turborepo#11023) - docs: Add new testimonial to home page by [@​anthonyshew](https://github.com/anthonyshew) in [#​11116](vercel/turborepo#11116) - docs: Fix copy-pasted testimonial quote by [@​anthonyshew](https://github.com/anthonyshew) in [#​11117](vercel/turborepo#11117) - docs: Fix typo in tailwind set up guide by [@​hookim](https://github.com/hookim) in [#​11143](vercel/turborepo#11143) - docs: Update Prisma integration guide link by [@​AdelFetner](https://github.com/AdelFetner) in [#​11155](vercel/turborepo#11155) - docs: Fix vitest merged code coverage example by [@​jonathansamines](https://github.com/jonathansamines) in [#​11158](vercel/turborepo#11158) ##### Examples - examples: Bump `turbo` to latest by [@​anthonyshew](https://github.com/anthonyshew) in [#​11100](vercel/turborepo#11100) - examples: Remove uneeded microfrontends.json property by [@​anthonyshew](https://github.com/anthonyshew) in [#​11101](vercel/turborepo#11101) - examples(dev-deps): bump [@​types/react](https://github.com/types/react) from 19.2.2 to 19.2.5 in /examples/non-monorepo by [@​dependabot](https://github.com/dependabot)\[bot] in [#​11125](vercel/turborepo#11125) - examples(with-nestjs): Add missing eslint devDependency by [@​cmg8431](https://github.com/cmg8431) in [#​11138](vercel/turborepo#11138) - fix(with-vite-react): Remove unused React import to fix build error by [@​chosim-dvlpr](https://github.com/chosim-dvlpr) in [#​11162](vercel/turborepo#11162) - examples(dev-deps): bump the with-svelte group in /examples/with-svelte with 2 updates by [@​dependabot](https://github.com/dependabot)\[bot] in [#​11152](vercel/turborepo#11152) - examples(dev-deps): bump typescript-eslint from 8.46.3 to 8.47.0 in /examples/basic in the basic group by [@​dependabot](https://github.com/dependabot)\[bot] in [#​11149](vercel/turborepo#11149) - examples(dev-deps): bump [@​types/react](https://github.com/types/react) from 19.2.5 to 19.2.7 in /examples/non-monorepo by [@​dependabot](https://github.com/dependabot)\[bot] in [#​11151](vercel/turborepo#11151) - examples(kitchen-sink): Use simpler eslint config for kitchen-sink by [@​dsm23](https://github.com/dsm23) in [#​11163](vercel/turborepo#11163) - examples: Fix lockfile in kitchen-sink by [@​anthonyshew](https://github.com/anthonyshew) in [#​11174](vercel/turborepo#11174) - examples(security): Upgrade Next.js versions by [@​anthonyshew](https://github.com/anthonyshew) in [#​11188](vercel/turborepo#11188) - examples: Add `with-biome` example by [@​2qp](https://github.com/2qp) in [#​11145](vercel/turborepo#11145) ##### Changelog - chore: Get rid of unneeded workspace definition by [@​anthonyshew](https://github.com/anthonyshew) in [#​11102](vercel/turborepo#11102) - fix: Make selected task highlight use reverse video for accessibility by [@​biru-codeastromer](https://github.com/biru-codeastromer) in [#​11090](vercel/turborepo#11090) - feat(tui): Add padding to task names and icons by [@​anthonyshew](https://github.com/anthonyshew) in [#​11104](vercel/turborepo#11104) - docs: Fix grammar, consistency, and formatting issues in CONTRIBUTING.md by [@​DevaanshKathuria](https://github.com/DevaanshKathuria) in [#​11105](vercel/turborepo#11105) - fix(workspaces): Use `shell` option on Windows in `execa` call by [@​anthonyshew](https://github.com/anthonyshew) in [#​11108](vercel/turborepo#11108) - ci(fix): Fix flaky macOS tests by [@​anthonyshew](https://github.com/anthonyshew) in [#​11128](vercel/turborepo#11128) - feat: Add Windows-specific env var to default passthroughs by [@​anthonyshew](https://github.com/anthonyshew) in [#​11126](vercel/turborepo#11126) - fix(config-dir): Resolve relative `TURBO_CONFIG_DIR_PATH` before validation by [@​praggCode](https://github.com/praggCode) in [#​11122](vercel/turborepo#11122) - fix: Use -z option to git commands to handle unicode file paths by [@​hahnlee](https://github.com/hahnlee) in [#​10844](vercel/turborepo#10844) - test: Coverage for [#​10844](vercel/turborepo#10844) by [@​anthonyshew](https://github.com/anthonyshew) in [#​11137](vercel/turborepo#11137) - docs(internal): Document release pipeline by [@​anthonyshew](https://github.com/anthonyshew) in [#​11141](vercel/turborepo#11141) - fix: Validate missing <cwd-path> argument in test-codemod server script by [@​sakina1303](https://github.com/sakina1303) in [#​11166](vercel/turborepo#11166) - ci: fixing release pipeline by [@​anthonyshew](https://github.com/anthonyshew) in [#​11179](vercel/turborepo#11179) - ci: Ensure npm version is current by [@​anthonyshew](https://github.com/anthonyshew) in [#​11180](vercel/turborepo#11180) - ci: Log npm version by [@​anthonyshew](https://github.com/anthonyshew) in [#​11181](vercel/turborepo#11181) - ci: More release pipeline logging by [@​anthonyshew](https://github.com/anthonyshew) in [#​11183](vercel/turborepo#11183) - ci: Loose env mode for publishing step by [@​anthonyshew](https://github.com/anthonyshew) in [#​11184](vercel/turborepo#11184) #### New Contributors - [@​biru-codeastromer](https://github.com/biru-codeastromer) made their first contribution in [#​11090](vercel/turborepo#11090) - [@​DevaanshKathuria](https://github.com/DevaanshKathuria) made their first contribution in [#​11105](vercel/turborepo#11105) - [@​zacowan](https://github.com/zacowan) made their first contribution in [#​11109](vercel/turborepo#11109) - [@​charpeni](https://github.com/charpeni) made their first contribution in [#​11023](vercel/turborepo#11023) - [@​praggCode](https://github.com/praggCode) made their first contribution in [#​11122](vercel/turborepo#11122) - [@​hahnlee](https://github.com/hahnlee) made their first contribution in [#​10844](vercel/turborepo#10844) - [@​cmg8431](https://github.com/cmg8431) made their first contribution in [#​11138](vercel/turborepo#11138) - [@​hookim](https://github.com/hookim) made their first contribution in [#​11143](vercel/turborepo#11143) - [@​AdelFetner](https://github.com/AdelFetner) made their first contribution in [#​11155](vercel/turborepo#11155) - [@​sakina1303](https://github.com/sakina1303) made their first contribution in [#​11166](vercel/turborepo#11166) - [@​chosim-dvlpr](https://github.com/chosim-dvlpr) made their first contribution in [#​11162](vercel/turborepo#11162) - [@​jonathansamines](https://github.com/jonathansamines) made their first contribution in [#​11158](vercel/turborepo#11158) - [@​dsm23](https://github.com/dsm23) made their first contribution in [#​11163](vercel/turborepo#11163) - [@​2qp](https://github.com/2qp) made their first contribution in [#​11145](vercel/turborepo#11145) **Full Changelog**: <vercel/turborepo@v2.6.1...v2.6.2> </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi4xNC4yIiwidXBkYXRlZEluVmVyIjoiNDIuMTQuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==--> Reviewed-on: https://git.csmpro.ru/csmpro/mapban/pulls/65 Co-authored-by: Renovate Bot <renovate@csmpro.ru> Co-committed-by: Renovate Bot <renovate@csmpro.ru>
fix(config-dir): resolve relative TURBO_CONFIG_DIR_PATH before validation
Fixes issue #8645
Summary
This PR fixes a bug where setting
TURBO_CONFIG_DIR_PATHto a relative path(e.g.,
"configs") caused Turborepo to fail with:AbsoluteSystemPathBuf::new()only accepts absolute paths, but the value fromthe environment variable was passed directly without being resolved.
This caused a startup failure even though the provided path was valid.
Root Cause
When a user sets: TURBO_CONFIG_DIR_PATH="configs"
Turborepo attempted to validate
"configs"as an absolute path.Since it is relative, the validator rejected it, causing Turborepo to stop early.
What This PR Changes
Detects whether the provided
TURBO_CONFIG_DIR_PATHis relativeIf relative, resolves it against the current working directory:
Converts the resolved path to UTF-8
Passes the resulting absolute path into AbsoluteSystemPathBuf::new()
Leaves absolute paths fully unchanged
Introduces zero breaking changes
Why This Fix Is Safe