Skip to content

Commit

Permalink
fix path
Browse files Browse the repository at this point in the history
  • Loading branch information
waahm7 committed Jul 17, 2024
1 parent aaf2f70 commit 09149ba
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions builder/imports/jdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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
Expand Down

0 comments on commit 09149ba

Please sign in to comment.