Skip to content

Fix config paths on different Windows drives - #3755

Closed
LouisDeconinck wants to merge 2 commits into
pre-commit:mainfrom
LouisDeconinck:fix/config-cross-drive-2530
Closed

LouisDeconinck wants to merge 2 commits into
pre-commit:mainfrom
LouisDeconinck:fix/config-cross-drive-2530

Conversation

@LouisDeconinck

@LouisDeconinck LouisDeconinck commented Sep 10, 2026

Copy link
Copy Markdown

Summary

Fixes #2530 by preserving an absolute config path when the config file is on a different Windows drive from the Git repository. The existing relative-path behavior is unchanged for paths on the same drive.

Adds a regression test covering the cross-drive ValueError.

🤖🤖 This pull request was created with assistance from OpenAI Codex, an AI coding agent.

Checklist

  • The change is limited to the reported bug.
  • A regression test is included.

@asottile asottile closed this Sep 10, 2026
@pre-commit pre-commit locked as spam and limited conversation to collaborators Sep 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

ValueError on Windows when config is on a different drive than the git repo

2 participants