[bug] conan config install skips files if ".git" is in the path
See original GitHub issueI had set my CONAN_USER_HOME env-var to “$HOME/.gitlab-conan” (doesn’t matter why).
Later, I ran the conan config install command, providing a git repo that stores shared-company config, but that command has appeared to silently fail, or do nothing at all, as the config hasn’t been applied, at all.
The configuration repo is properly configured as I’ve tested it on other environments where conan’s home is set to the default path, ~/.conan, and it works as expected.
When I run the command, I always get the output Repo cloned! and that’s it, it quits right after. So I’ve decided to dig in and find out why, and I found that inside the conans/client/conf/config_installer.py file, on this line, there’s a check for the .git word being in the root string returned from walk(). I get the idea here, but it might be required to re-implement this to look for .git only in the last component of the root, as this is what actually matters, allowing other components of the path to anything the user desires.
It might not be that trivial to solve this nicely, so an alternative could be to warn users in the docs about setting conan home to paths that include .git in it.
Environment Details (include every applicable attribute)
- Operating System+version: Ubuntu 16.04 (Docker container)
- Conan version: 1.34.0
- Python version: 3.8.8
Steps to reproduce (Include if Applicable)
- Set the conan home to a path that has
.gitin it, no matter where exactly, e.g..gitlab - Try to install some config using
conan config install
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (6 by maintainers)

Top Related StackOverflow Question
Seems that the issue is legit. We have updated the test at #8605 and it fails as you reported and now I understand better the issue. Thank you!
@danimtb I’ve simply removed the dot from the dir’s name, becoming
~/gitlab-conaninstead of~/.gitlab-conan, but it doesn’t really solve anything, does it?I’ll see if I can solve it myself, but I can’t promise that I’ll have time for it in the upcoming days 😕