From 4d3028d784336d122335057e364c993119ba709d Mon Sep 17 00:00:00 2001 From: Martin Delille Date: Thu, 27 Oct 2022 09:18:37 +0200 Subject: [PATCH] Improve env management --- recipes/openjdk/all/conanfile.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/recipes/openjdk/all/conanfile.py b/recipes/openjdk/all/conanfile.py index bf24a8cf96c7b..4afefe572c5e9 100644 --- a/recipes/openjdk/all/conanfile.py +++ b/recipes/openjdk/all/conanfile.py @@ -61,8 +61,5 @@ def package(self): def package_info(self): self.output.info(f"Creating JAVA_HOME environment variable with : {self.package_folder}") - self.env_info.JAVA_HOME = self.package_folder - - bin_path = os.path.join(self.package_folder, "bin") - self.output.info(f"Appending PATH environment variable with : {bin_path}") - self.env_info.PATH.append(bin_path) + self.buildenv_info.append("JAVA_HOME", self.package_folder) + self.buildenv_info.prepend_path("PATH", os.path.join(self.package_folder, "bin"))