fix: do not duplicate site dirs in Unix.iter_{config,site}_dirs() when use_site_for_root is active#469
Merged
Conversation
gaborbernat
approved these changes
Mar 26, 2026
auto-merge was automatically disabled
March 26, 2026 18:43
Pull request was converted to draft
Contributor
Author
|
I'll fix the test I added to run on Windows as well. Since it was a test for Unix-specific code, I hadn't thought that it'd run on Windows. |
…n use_site_for_root is active
77b923f to
7b0aa58
Compare
Contributor
Author
|
I was unable to get anything to run on Windows, getting all kinds of permission errors from some overenthusiastic security system. The test now looks like the one above, so I hope this makes the CI pass. |
gaborbernat
approved these changes
Mar 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Unix.iter_config_dirs()andUnix.iter_data_dirs()yield both the user config/data dir and the site config/data dirs. Whenuse_site_for_rootis set and active, the user property is redirected to the first site property. This means that the iter-functions return the first site property twice.This PR adds a check to skip yielding the user property if
use_site_for_rootis set and active, fixing the duplication.