Skip to content
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

[wip] Fix config install not working when .git* folder is in the path #8605

Merged
merged 8 commits into from Mar 17, 2021

Conversation

danimtb
Copy link
Member

@danimtb danimtb commented Mar 4, 2021

Changelog: Bugfix: Fix config install not working when .git* folder is in the path.
Docs: omit

closes #8594

@danimtb danimtb changed the title [wip] Add config install test with .gitlab folder [wip] Fix config install not working when .git* folder is in the path Mar 8, 2021
@danimtb danimtb added this to the 1.35 milestone Mar 8, 2021
@danimtb danimtb requested a review from czoido March 8, 2021 10:47
@@ -130,7 +130,7 @@ def _process_folder(config, folder, cache, output):
folder = os.path.join(folder, config.source_folder)
for root, dirs, files in walk(folder):
dirs[:] = [d for d in dirs if d != ".git"]
if ".git" in root:
if os.path.join(".git", "") in root:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if this will make a difference in the end, the line above: dirs[:] = [d for d in dirs if d != ".git"]
Is already filtering the .git folder.
Also, the new comparison will compare if .git/ is in root that will have the value my/root/path/git so it will always be false because of the forward slash join is going to add in the end.
I don't know if I'm missing something, but is this comparison needed in the end?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are right, I have removed that line as it looks useless and added a check in the test

@danimtb danimtb marked this pull request as ready for review March 9, 2021 15:36
@danimtb danimtb merged commit 54c9c8d into conan-io:develop Mar 17, 2021
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.

[bug] conan config install skips files if ".git" is in the path
2 participants