question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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 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)

  1. Set the conan home to a path that has .git in it, no matter where exactly, e.g. .gitlab
  2. Try to install some config using conan config install

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
danimtbcommented, Mar 5, 2021

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!

0reactions
MrPointercommented, Mar 5, 2021

@danimtb I’ve simply removed the dot from the dir’s name, becoming ~/gitlab-conan instead 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 😕

Read more comments on GitHub >

github_iconTop Results From Across the Web

"conan config install" with git URL fails if storage path is not set
Trying to clone repo: <conan_config_git_repo_url> Repo cloned! Copying file cacert.pem to C:\PUBLIC\conan\.conan\.
Read more >
conan config — conan 1.45.0 documentation
During the installation, Conan skips any file with the name README.md or LICENSE.txt. The conan config install <item> calls are stored in a...
Read more >
Git Large File Storage (LFS) - GitLab Docs
Managing large files such as audio, video and graphics files has always been one of the shortcomings of Git. The general recommendation is...
Read more >
conan Changelog - pyup.io
- BugFix: Added escapes for backslashes in ``cmake`` generator. - BugFix: `conan config install` now raises error if `git clone` fails. - BugFix:...
Read more >
Config Cheat Sheet - Docs
Any changes to the Gitea configuration file should be made in custom/conf/app.ini or any corresponding location. When installing from a distribution, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found