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
[bug] conan config install skips files if ".git" is in the path #8594
Comments
Hi @MrPointer, I tried to reproduce your issue but it working fine for me. I set CONAN_USER_HOME to a local cloned repo (with As you pointed out, the If you could provide me with a github repo to |
You probably misunderstood me, or the exact scenario I'm describing. I'll try to be more specific 😅 Let's assume I have the following path set as I'm talking about this piece of code: for root, dirs, files in walk(folder):
dirs[:] = [d for d in dirs if d != ".git"]
if ".git" in root:
continue I hope it makes it a bit clearer 🙂 |
Thanks for the clarification. Do you mean you are installing from that |
No, this is only where I'm installing to. I can't provide the exact git repo that stores my config because it's proprietary, but the full command looks something like this: |
@MrPointer I have added a test here #8605 trying to reproduce your case. It uses a local git repository for simplification but it should work in the same way. Let me know if that is similar enough to issue you described. Thank you. |
@danimtb Yeah it seems so, thanks! Just make sure |
yep, the conan/conans/client/conan_api.py Line 231 in a0d81b3
|
please, let me know if you managed to solve the issue as I am not able to reproduce it from my side. Thanks! |
@danimtb I've simply removed the dot from the dir's name, becoming |
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! |
I 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 theroot
string returned fromwalk()
. I get the idea here, but it might be required to re-implement this to look for.git
only in the last component of theroot
, 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)
Steps to reproduce (Include if Applicable)
.git
in it, no matter where exactly, e.g..gitlab
conan config install
The text was updated successfully, but these errors were encountered: