mirror of
https://github.com/actions/setup-java.git
synced 2025-04-20 09:56:46 +00:00
Fix pathing
This commit is contained in:
parent
d04dab381d
commit
1d110a99d1
2 changed files with 12 additions and 10 deletions
|
@ -48,8 +48,7 @@ function getJava(version, arch, jdkFile) {
|
|||
}
|
||||
else {
|
||||
if (!jdkFile) {
|
||||
const downloadUrl = yield getDownloadUrl(version);
|
||||
jdkFile = yield tc.downloadTool(downloadUrl);
|
||||
jdkFile = yield downloadJava(version);
|
||||
}
|
||||
core.debug('Retrieving Jdk from local path');
|
||||
const compressedFileExtension = getFileEnding(jdkFile);
|
||||
|
@ -145,7 +144,7 @@ function unzipJavaDownload(repoRoot, fileEnding, destinationFolder) {
|
|||
}
|
||||
});
|
||||
}
|
||||
function getDownloadUrl(version) {
|
||||
function downloadJava(version) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
let filterString = '';
|
||||
if (IS_WINDOWS) {
|
||||
|
@ -170,7 +169,8 @@ function getDownloadUrl(version) {
|
|||
if (refs.length == 0) {
|
||||
throw new Error(`No valid download found for version ${version}. Check https://static.azul.com/zulu/bin/ for a list of valid versions or download your own jdk file and add the jdkFile argument`);
|
||||
}
|
||||
const downloadLocation = refs[0].slice('<a href="'.length, refs[0].length - '">'.length);
|
||||
return `https://static.azul.com/zulu/bin/${downloadLocation}`;
|
||||
const fileName = refs[0].slice('<a href="'.length, refs[0].length - '">'.length);
|
||||
const dest = yield tc.downloadTool(`https://static.azul.com/zulu/bin/${fileName}`);
|
||||
return path.join(dest, fileName);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue