docs icon indicating copy to clipboard operation
docs copied to clipboard

How to transit tools.get_env to Conan 2.x schema?

Open uilianries opened this issue 3 years ago • 3 comments

The current migration guide covers most of important parts, but the migration is not totally clear about environment variables.

Some recipes, they collect external environment variables, and so far tools.get_env it's the current option.

With the introduction of conan.tools.env, we should consider configuration files instead, but it's not totally clear how to do it.

It would be great if it was documented and specified as a replacement for tools.get_env.

uilianries avatar Aug 26 '22 11:08 uilianries

From what I see in conan.tools source code, there is no tool for this, so back to os.environ.get()...

SpaceIm avatar Aug 26 '22 21:08 SpaceIm

I've opened https://github.com/conan-io/conan/issues/11969

SpaceIm avatar Aug 26 '22 21:08 SpaceIm

@SpaceIm thank you @SpaceIm !!

uilianries avatar Aug 29 '22 13:08 uilianries