Skip to content

Conversation

@praggCode
Copy link
Contributor

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_PATH to a relative path
(e.g., "configs") caused Turborepo to fail with:

PathError::NotAbsolute("configs")

AbsoluteSystemPathBuf::new() only accepts absolute paths, but the value from
the 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_PATH is relative

  • If relative, resolves it against the current working directory:

    std::env::current_dir()?.join(raw)

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

  • Relative → absolute resolution is deterministic and standard practice
  • Absolute paths behave exactly the same as before
  • Error surface area decreases (fewer startup failures)
  • The change is minimal, well-scoped, and consistent with existing path logic
  • No impact on users who do not set the environment variable

@praggCode praggCode requested a review from a team as a code owner November 15, 2025 14:48
@praggCode praggCode requested a review from tknickman November 15, 2025 14:48
@vercel
Copy link
Contributor

vercel bot commented Nov 15, 2025

@praggCode is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

@praggCode praggCode changed the title fix: resolve TURBO_CONFIG_DIR_PATH to absolute path fix(config-dir): Resolve relative TURBO_CONFIG_DIR_PATH before validation Nov 15, 2025
@anthonyshew anthonyshew changed the title fix(config-dir): Resolve relative TURBO_CONFIG_DIR_PATH before validation fix(config-dir): Resolve relative TURBO_CONFIG_DIR_PATH before validation Nov 18, 2025
@vercel
Copy link
Contributor

vercel bot commented Nov 18, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
examples-basic-web Ready Ready Preview Comment Nov 18, 2025 5:32am
examples-designsystem-docs Ready Ready Preview Comment Nov 18, 2025 5:32am
examples-gatsby-web Ready Ready Preview Comment Nov 18, 2025 5:32am
examples-kitchensink-blog Ready Ready Preview Comment Nov 18, 2025 5:32am
examples-nonmonorepo Ready Ready Preview Comment Nov 18, 2025 5:32am
examples-svelte-web Ready Ready Preview Comment Nov 18, 2025 5:32am
examples-tailwind-web Ready Ready Preview Comment Nov 18, 2025 5:32am
examples-vite-web Ready Ready Preview Comment Nov 18, 2025 5:32am
turbo-site Ready Ready Preview Comment Nov 18, 2025 5:32am

Copy link
Contributor

@anthonyshew anthonyshew left a 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!

@anthonyshew anthonyshew merged commit 445df7e into vercel:main Nov 18, 2025
98 checks passed
ch4og pushed a commit to csmplay/mapban that referenced this pull request Dec 4, 2025
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) | [![age](https://developer.mend.io/api/mc/badges/age/npm/turbo/2.6.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/turbo/2.6.1/2.6.2?slim=true)](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 [@&#8203;charpeni](https://github.com/charpeni) in [#&#8203;11023](vercel/turborepo#11023)
- docs: Add new testimonial to home page by [@&#8203;anthonyshew](https://github.com/anthonyshew) in [#&#8203;11116](vercel/turborepo#11116)
- docs: Fix copy-pasted testimonial quote by [@&#8203;anthonyshew](https://github.com/anthonyshew) in [#&#8203;11117](vercel/turborepo#11117)
- docs: Fix typo in tailwind set up guide by [@&#8203;hookim](https://github.com/hookim) in [#&#8203;11143](vercel/turborepo#11143)
- docs: Update Prisma integration guide link by [@&#8203;AdelFetner](https://github.com/AdelFetner) in [#&#8203;11155](vercel/turborepo#11155)
- docs: Fix vitest merged code coverage example by [@&#8203;jonathansamines](https://github.com/jonathansamines) in [#&#8203;11158](vercel/turborepo#11158)

##### Examples

- examples: Bump `turbo` to latest by [@&#8203;anthonyshew](https://github.com/anthonyshew) in [#&#8203;11100](vercel/turborepo#11100)
- examples: Remove uneeded microfrontends.json property by [@&#8203;anthonyshew](https://github.com/anthonyshew) in [#&#8203;11101](vercel/turborepo#11101)
- examples(dev-deps): bump [@&#8203;types/react](https://github.com/types/react) from 19.2.2 to 19.2.5 in /examples/non-monorepo by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;11125](vercel/turborepo#11125)
- examples(with-nestjs): Add missing eslint devDependency by [@&#8203;cmg8431](https://github.com/cmg8431) in [#&#8203;11138](vercel/turborepo#11138)
- fix(with-vite-react): Remove unused React import to fix build error by [@&#8203;chosim-dvlpr](https://github.com/chosim-dvlpr) in [#&#8203;11162](vercel/turborepo#11162)
- examples(dev-deps): bump the with-svelte group in /examples/with-svelte with 2 updates by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;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 [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;11149](vercel/turborepo#11149)
- examples(dev-deps): bump [@&#8203;types/react](https://github.com/types/react) from 19.2.5 to 19.2.7 in /examples/non-monorepo by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;11151](vercel/turborepo#11151)
- examples(kitchen-sink): Use simpler eslint config for kitchen-sink by [@&#8203;dsm23](https://github.com/dsm23) in [#&#8203;11163](vercel/turborepo#11163)
- examples: Fix lockfile in kitchen-sink by [@&#8203;anthonyshew](https://github.com/anthonyshew) in [#&#8203;11174](vercel/turborepo#11174)
- examples(security): Upgrade Next.js versions by [@&#8203;anthonyshew](https://github.com/anthonyshew) in [#&#8203;11188](vercel/turborepo#11188)
- examples: Add `with-biome` example by [@&#8203;2qp](https://github.com/2qp) in [#&#8203;11145](vercel/turborepo#11145)

##### Changelog

- chore: Get rid of unneeded workspace definition by [@&#8203;anthonyshew](https://github.com/anthonyshew) in [#&#8203;11102](vercel/turborepo#11102)
- fix: Make selected task highlight use reverse video for accessibility by [@&#8203;biru-codeastromer](https://github.com/biru-codeastromer) in [#&#8203;11090](vercel/turborepo#11090)
- feat(tui): Add padding to task names and icons by [@&#8203;anthonyshew](https://github.com/anthonyshew) in [#&#8203;11104](vercel/turborepo#11104)
- docs: Fix grammar, consistency, and formatting issues in CONTRIBUTING.md by [@&#8203;DevaanshKathuria](https://github.com/DevaanshKathuria) in [#&#8203;11105](vercel/turborepo#11105)
- fix(workspaces): Use `shell` option on Windows in `execa` call by [@&#8203;anthonyshew](https://github.com/anthonyshew) in [#&#8203;11108](vercel/turborepo#11108)
- ci(fix): Fix flaky macOS tests by [@&#8203;anthonyshew](https://github.com/anthonyshew) in [#&#8203;11128](vercel/turborepo#11128)
- feat: Add Windows-specific env var to default passthroughs by [@&#8203;anthonyshew](https://github.com/anthonyshew) in [#&#8203;11126](vercel/turborepo#11126)
- fix(config-dir): Resolve relative `TURBO_CONFIG_DIR_PATH` before validation by [@&#8203;praggCode](https://github.com/praggCode) in [#&#8203;11122](vercel/turborepo#11122)
- fix: Use -z option to git commands to handle unicode file paths by [@&#8203;hahnlee](https://github.com/hahnlee) in [#&#8203;10844](vercel/turborepo#10844)
- test: Coverage for [#&#8203;10844](vercel/turborepo#10844) by [@&#8203;anthonyshew](https://github.com/anthonyshew) in [#&#8203;11137](vercel/turborepo#11137)
- docs(internal): Document release pipeline by [@&#8203;anthonyshew](https://github.com/anthonyshew) in [#&#8203;11141](vercel/turborepo#11141)
- fix: Validate missing <cwd-path> argument in test-codemod server script by [@&#8203;sakina1303](https://github.com/sakina1303) in [#&#8203;11166](vercel/turborepo#11166)
- ci: fixing release pipeline by [@&#8203;anthonyshew](https://github.com/anthonyshew) in [#&#8203;11179](vercel/turborepo#11179)
- ci: Ensure npm version is current by [@&#8203;anthonyshew](https://github.com/anthonyshew) in [#&#8203;11180](vercel/turborepo#11180)
- ci: Log npm version by [@&#8203;anthonyshew](https://github.com/anthonyshew) in [#&#8203;11181](vercel/turborepo#11181)
- ci: More release pipeline logging by [@&#8203;anthonyshew](https://github.com/anthonyshew) in [#&#8203;11183](vercel/turborepo#11183)
- ci: Loose env mode for publishing step by [@&#8203;anthonyshew](https://github.com/anthonyshew) in [#&#8203;11184](vercel/turborepo#11184)

#### New Contributors

- [@&#8203;biru-codeastromer](https://github.com/biru-codeastromer) made their first contribution in [#&#8203;11090](vercel/turborepo#11090)
- [@&#8203;DevaanshKathuria](https://github.com/DevaanshKathuria) made their first contribution in [#&#8203;11105](vercel/turborepo#11105)
- [@&#8203;zacowan](https://github.com/zacowan) made their first contribution in [#&#8203;11109](vercel/turborepo#11109)
- [@&#8203;charpeni](https://github.com/charpeni) made their first contribution in [#&#8203;11023](vercel/turborepo#11023)
- [@&#8203;praggCode](https://github.com/praggCode) made their first contribution in [#&#8203;11122](vercel/turborepo#11122)
- [@&#8203;hahnlee](https://github.com/hahnlee) made their first contribution in [#&#8203;10844](vercel/turborepo#10844)
- [@&#8203;cmg8431](https://github.com/cmg8431) made their first contribution in [#&#8203;11138](vercel/turborepo#11138)
- [@&#8203;hookim](https://github.com/hookim) made their first contribution in [#&#8203;11143](vercel/turborepo#11143)
- [@&#8203;AdelFetner](https://github.com/AdelFetner) made their first contribution in [#&#8203;11155](vercel/turborepo#11155)
- [@&#8203;sakina1303](https://github.com/sakina1303) made their first contribution in [#&#8203;11166](vercel/turborepo#11166)
- [@&#8203;chosim-dvlpr](https://github.com/chosim-dvlpr) made their first contribution in [#&#8203;11162](vercel/turborepo#11162)
- [@&#8203;jonathansamines](https://github.com/jonathansamines) made their first contribution in [#&#8203;11158](vercel/turborepo#11158)
- [@&#8203;dsm23](https://github.com/dsm23) made their first contribution in [#&#8203;11163](vercel/turborepo#11163)
- [@&#8203;2qp](https://github.com/2qp) made their first contribution in [#&#8203;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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants