Skip to content

Commit 4cf0673

Browse files
committed
golang
1 parent 09149ba commit 4cf0673

File tree

2 files changed

+16
-15
lines changed

2 files changed

+16
-15
lines changed

builder/imports/golang.py

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
'windows-x64': 'https://go.dev/dl/go1.21.5.windows-amd64.zip',
2020
'windows-x86': 'https://go.dev/dl/go1.21.5.windows-386.zip',
2121
'macos-x64': 'https://go.dev/dl/go1.21.5.darwin-amd64.tar.gz',
22+
'macos-armv8': 'https://go.dev/dl/go1.21.5.darwin-arm64.tar.gz',
2223
}
2324

2425

builder/imports/jdk.py

+15-15
Original file line numberDiff line numberDiff line change
@@ -56,20 +56,20 @@ def install(self, env):
5656
'lib/**/jvm.dll', '**/lib/**/jvm.dll'],
5757
]
5858
found = 0
59-
#
60-
# for paths in required_files:
61-
# path_found = False
62-
# for path in paths:
63-
# for prefix in prefixes:
64-
# if not prefix:
65-
# continue
66-
# full_path = os.path.join(prefix, path)
67-
# if glob.glob(full_path, recursive=True):
68-
# found += 1
69-
# path_found = True
70-
# break
71-
# if path_found:
72-
# break
59+
60+
for paths in required_files:
61+
path_found = False
62+
for path in paths:
63+
for prefix in prefixes:
64+
if not prefix:
65+
continue
66+
full_path = os.path.join(prefix, path)
67+
if glob.glob(full_path, recursive=True):
68+
found += 1
69+
path_found = True
70+
break
71+
if path_found:
72+
break
7373

7474
if found >= len(required_files):
7575
print('Found existing JDK8 at {}'.format(prefix))
@@ -95,7 +95,7 @@ def install(self, env):
9595
print('Downloading {}'.format(url))
9696
fetch_and_extract(url, filename, install_dir)
9797
os.remove(filename)
98-
print(glob.glob(os.path.join(install_dir, 'jdk*')))
98+
9999
jdk_home = glob.glob(os.path.join(install_dir, '*jdk*'))[0]
100100
assert jdk_home
101101

0 commit comments

Comments
 (0)