conan
conan copied to clipboard
[bug] Append `self.source_folder` into `Environment()`: TypeError: sequence item 0: expected str instance, NoneType found
Environment Details (include every applicable attribute)
- Operating System+version: macOS Monterey
- Compiler+version: AppleClang 13
- Conan version: 1.52.0
- Python version: 3.10.6
Steps to reproduce (Include if Applicable)
run conan create on a recipe with this logic in generate()
from conan.tools.cmake import cmake_layout
from conan.tools.env import Environment
[...]
def layout(self):
cmake_layout(self)
def generate(self):
env = Environment()
env.prepend_path("PKG_CONFIG_PATH", self.source_folder)
env.vars(self).save_script("conanbuildenv_pkg_config_path")
Actually I've tested this block in a test_package (for conan v2 migration of pkgconf recipe in CCI)
Logs (Executed commands with output) (Include/Attach if Applicable)
ERROR: pkgconf/1.7.4 (test package): Error in generate() method, line 43
envvars.save_script("conanbuildenv_pkg_config_path")
TypeError: sequence item 0: expected str instance, NoneType found