fix(config-dir): Resolve relative `TURBO_CONFIG_DIR_PATH` before validation (#11122)
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:
```rust
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
---------
Co-authored-by: Anthony Shew <anthony.shew@vercel.com>
Co-authored-by: Anthony Shew <anthonyshew@gmail.com>