From 09149ba06be5528f7461693c9792d442b29c17ad Mon Sep 17 00:00:00 2001 From: Waqar Ahmed Khan Date: Wed, 17 Jul 2024 12:26:04 -0700 Subject: [PATCH] fix path --- builder/imports/jdk.py | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/builder/imports/jdk.py b/builder/imports/jdk.py index c640b19ef..791f08ba0 100644 --- a/builder/imports/jdk.py +++ b/builder/imports/jdk.py @@ -56,20 +56,20 @@ def install(self, env): 'lib/**/jvm.dll', '**/lib/**/jvm.dll'], ] found = 0 - - for paths in required_files: - path_found = False - for path in paths: - for prefix in prefixes: - if not prefix: - continue - full_path = os.path.join(prefix, path) - if glob.glob(full_path, recursive=True): - found += 1 - path_found = True - break - if path_found: - break + # + # for paths in required_files: + # path_found = False + # for path in paths: + # for prefix in prefixes: + # if not prefix: + # continue + # full_path = os.path.join(prefix, path) + # if glob.glob(full_path, recursive=True): + # found += 1 + # path_found = True + # break + # if path_found: + # break if found >= len(required_files): print('Found existing JDK8 at {}'.format(prefix)) @@ -95,8 +95,8 @@ def install(self, env): print('Downloading {}'.format(url)) fetch_and_extract(url, filename, install_dir) os.remove(filename) - - jdk_home = glob.glob(os.path.join(install_dir, 'jdk*'))[0] + print(glob.glob(os.path.join(install_dir, 'jdk*'))) + jdk_home = glob.glob(os.path.join(install_dir, '*jdk*'))[0] assert jdk_home # OSX is special and has a Contents/Home folder inside the distro