mirror of
				https://gitea.com/actions/setup-java.git
				synced 2025-11-04 05:39:09 +08:00 
			
		
		
		
	Fix pathing
This commit is contained in:
		@@ -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);
 | 
			
		||||
    });
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user