conan icon indicating copy to clipboard operation
conan copied to clipboard

[bug] .conanrc in root of windows drive is not detected

Open peakschris opened this issue 1 year ago • 2 comments

Describe the bug

Windows, conan 2.4.0

I placed a .conanrc file with conan_home=d:\workdir\conan in the root of my d: drive, and then ran conan profile detect in d:\workdir\project. The .conanrc file was not detected and profile is written to default location.

Moving .conanrc to d:\workdir, it is detected

How to reproduce it

No response

peakschris avatar Jun 07 '24 10:06 peakschris

Hi @peakschris

Thanks for reporting.

So far, this was intentional. The .conanrc is intended to be a per-project mechanism, so setting it in the root directory would make it global configuration, and that can be configured at the system level (via CONAN_HOME env-var, for example). Why do you want to put the .conanrc in the root folder, can you please elaborate a bit more?

memsharded avatar Jun 07 '24 10:06 memsharded

I'm happy with that restriction (perhaps it could be documented if not already)?

I was trying to put it in the root of my drive because I would like a global config for a user without use of envvars. The reason is explained here: https://github.com/conan-io/conan/issues/16431. If that feature was supported, I would not be trying to place it in the drive root.

peakschris avatar Jun 07 '24 10:06 peakschris

I think this ticket was closed in Conan 2.5 in PR https://github.com/conan-io/conan/pull/16514. Closing the ticket, but please let us know, create new tickets or re-open if this is not the case. Thanks for the feedback!

memsharded avatar Sep 02 '24 09:09 memsharded